avatar rudisten1
rudisten1
24 Jan 2018

Steps to reproduce the issue

Configure SMTP settings under global settings to use an STMP server with authentication (port 587, STARTTLS)
Try to send a test email

Expected result

A message indicating the mail has been sent.

Actual result

A messase telling you that it has not been possible to connect to the SMTP server.

System information (as much as possible)

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

Additional comments

Possibly due to new version of PHP mailer

avatar rudisten1 rudisten1 - open - 24 Jan 2018
avatar joomla-cms-bot joomla-cms-bot - unlabeled - 24 Jan 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Jan 2018
Category Authentication
avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Jan 2018
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Jan 2018

Any Comment by Maintainers?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19440.

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Jan 2018

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.

avatar rudisten1
rudisten1 - comment - 26 Jan 2018

I suppose it could be a matter of certificate verification. Does your smtp server use certificates?
How to enable debug?

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Jan 2018

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

avatar rudisten1
rudisten1 - comment - 27 Jan 2018

OK, enabled. Message still is "SMTP Error: Could not connect to SMTP host."
Where to go now?
Thanks.

avatar Quy Quy - change - 27 Jan 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-01-27 23:06:11
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2018
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 27 Jan 2018
avatar Quy
Quy - comment - 27 Jan 2018

@rudisten1 Please ask for help at Joomla Forums.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19440.

avatar joomla-cms-bot
joomla-cms-bot - comment - 27 Jan 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19440

avatar rudisten1
rudisten1 - comment - 27 Jan 2018

This is not a matter of help, it is a BUG!

avatar mbabker
mbabker - comment - 27 Jan 2018

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.

avatar rudisten1
rudisten1 - comment - 28 Jan 2018

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.

avatar mbabker
mbabker - comment - 28 Jan 2018

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.

avatar rudisten1
rudisten1 - comment - 28 Jan 2018

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?

avatar mbabker
mbabker - comment - 28 Jan 2018

#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.

Add a Comment

Login with GitHub to post a comment