Emails not sending after updating to Joomla 3.5 [with solutions]

Many Perfect Dashboard users reported us that websites stop sending emails after upgrading to Joomla 3.5. Here’s a quick guide how to fix it.

What is the problem?

In some cases websites upgraded to Joomla 3.5 are no longer able to send emails. When it occurs, this affects all emails sent through SMTP using Joomla library PHPMailer 5.2.14 (introduced in Joomla 3.5). The examples are password reminder emails, registration emails or emails generated by Perfect Contact Form after user fills in the form.

This can happen regardless the update is done manually or automated through Perfect Dashboard.

Which sites are affected by this problem?

Every website that runs on server that use STARTTLS for SMTP and has „SMTP Security” set to „none” in Joomla Global Configuration > Server > Mail Settings is affected by this problem. Such configuration is very common as many hosting companies require it in order to send emails. That’s why it seems that a large number of websites are affected.

How to fix it?

There are several possible solutions to fix this problem.

1. Change mailer. Go to Global Configuration > Server > Mail Settings and change „Mailer” to PHP Mail or Sendmail (if it works on your hosting). It’s good because it’s the fastest solution, but I suggest it as a temporary solution only as mails sent by PHP Mail are often treated as spam.

ad 1

2 Pull the fix from Joomla GitHub repo. This issue has already been fixed, and the fix will be introduced with Joomla 3.5.1, but you can pull it earlier. Here’s a link. However, Piotr Moćko, our CTO, thinks that this fix is not perfect as the script always attempts to force authentication while sending emails if server offers STARTTLS (which is almost always true) and only after the first unsuccessful attempt it tries to send it again without the authentication. We will submit an amendment to this fix soon.

ad 2

3. Edit PHPMailer yourself. Edit file /libraries/vendor/phpmailer/phpmailer/class.phpmailer.php and on line 257 replace „public $SMTPAutoTLS = true; with „public $SMTPAutoTLS = false;”. Usually we don’t recommend amending the Joomla core, but in this case it it’s acceptable as it will be fixed in the new version anyway.

ad 3

4. Revert to PHPMailer 5.2.9. The third option is to downgrade PHPMailer to version 5.2.9 (which was used in Joomla 3.4.8). The files should be uploaded to libraries/vendor/phpmailer/ folder. As of today this one is our recommended solution.

ad 4