Configure SMTP settings under global settings to use an STMP server with authentication (port 587, STARTTLS)
Try to send a test email
A message indicating the mail has been sent.
A messase telling you that it has not been possible to connect to the SMTP server.
SO: Windows NT SRVRGSQL 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
db mysql: 5.7.13-log
db Collation : utf8_general_ci
PHP version: 5.6.24
Web Server: Microsoft-IIS/7.5
WebServer interface: cgi-fcgi
Joomla! version:! 3.8.3 Stable [ Amani ] 12-December-2017 15:00 GMT
Joomla! platform version: Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Possibly due to new version of PHP mailer
Category | ⇒ | Authentication |
Status | New | ⇒ | Information Required |
Hi, i have the exact same settings SMTP, starttls, 587, auth yes in two sites with 3.8.3 Joomla and both works fine. One mail server is exchange with SMTP other a Postfix. Both work.
I advice to enabled debug to get more info on the SMTP server errors.
I suppose it could be a matter of certificate verification. Does your smtp server use certificates?
How to enable debug?
I suppose it could be a matter of certificate verification. Does your smtp server use certificates?
I said my SMTP servers uses startTLS so it uses certificates ...
How to enable debug?
I think enabling joomla debug in global config should be enough
Anyway Joomla uses PHPMailer so https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
OK, enabled. Message still is "SMTP Error: Could not connect to SMTP host."
Where to go now?
Thanks.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-01-27 23:06:11 |
Closed_By | ⇒ | Quy |
Closed_By | Quy | ⇒ | joomla-cms-bot |
@rudisten1 Please ask for help at Joomla Forums.
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19440
This is not a matter of help, it is a BUG!
What is the bug? Unfortunately mail sending is one of those things that can be pretty tricky to get configured right, especially with SMTP and PHP 5.6+ where the core PHP engine enforces some secure connection settings that older versions didn't.
Your best bet is going to be to go through the forums where folks will help you with your site specific issues. If it turns out there actually is a bug in the mail sending code, that can be brought back here to be addressed, but in a large majority of cases issues with mail sending not working just ends up being a server level configuration issue and not something we can address in the Joomla code.
It IS a bug, as I tried the same settings using the command line openssl command and it worked.
Same settings using then sendmail option in Joomla also worked. So it's obviously due to the phpmailer class used by Joomla version 3.6 and later. Perhaps it's due to certificates verification process (PHP Mailer released an "important security update").
By the way it has nothing to do with searching for right configuration through the forums. It's a fix that has to be done in phpmailer code used by Joomla, so it's surely addressable in the Joomla code.
In addition the settings hadn't been changed when I upgraded to version 3.8.x.
More over it has been advised since Joomla 3.6, and a mod has also been proposed:
#9528
But in 3.8.3 version the bug still hasn't been fixed.
If you're talking about #9528 (comment) that change will never be accepted because that in essence completely disables SSL verification (imagine going to a HTTPS site and it not verifying certificates or anything like that, at that point it would just be HTTP over another protocol). The need for that change usually indicates server level problems outside of Joomla.
No. I'm speaking about the "$this->SMTPAutoTLS = false;" suggestion. There should be an option in Joomla settings to enable o disable it, just to reflect the "new" introduction released in the php mailer.
But this is not the actual problem. There are lots of complaints regarding this issue starting from the update after 3.5 but it seems the fix isn't worthy.
I said I have been able to send an email using the openssl comand through the same server, so why doesn't it work through Joomla?
#9528 was accepted though. The mail sending process, if it fails, will detect if this flag is set to true, turn it to false, and try sending again without opportunistic TLS. So in that case it may make two send attempts but if the message goes out on the second try then everything is OK.
As for why command line works but not messages through the PHPMailer library, hard to diagnose without having the exact server configuration and specs to debug the issue, including ensuring that the same basic configuration is being used in both PHPMailer (Joomla) and the command line.
Any Comment by Maintainers?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19440.