I have been battling with this for some time now. I have built a custom component for forms and it uses Joomla's mail functions to send email. I have checked all the data to make sure it is correct but the email just does not send, $mailer->Send()
returns true as well.
Turning on every style of error reporting reports no errors as well.
$mailer = JFactory::getMailer();
$mailer->setSender($settings->sender);
$mailer->addRecipient($settings->to);
$mailer->setSubject($settings->subject);
$mailer->isHTML(true);
$mailer->setBody($settings->body);
if($send = $mailer->Send()){
//email worked
//print_r($settings);
//exit;
}else{
echo 'error';
exit;
}
This is the heart of the component where the email is sent, the $settings is an object I use to store the information that I need to send the email, and after what is read as a "successful" send it outputs all the proper information. However mandrill, the service we use for emails never gets the email, meaning that as far as I can tell it failed to connect to SMTP meaning it should of had an error at some point in the connection, but Joomla fails to see it.
This same code works on many other sites, the one in question is a subdomain and hosted with hostgator, though without any form of error I have no clue where to start looking for a fix.