mflorezm Posted August 21, 2019 Share Posted August 21, 2019 Hi Everyone, i'm having problems to setup SMTP on PS 1.7.6.0. The mail server is a totally diferent server machine from server where PS 1.7.6.0. is hosted. I have no problems to send email with the smtp on my cell phone and on several tunderbrid email clients, but 1.7.6.0 always show me an error, no matter if we try secure SMTP (SSL) on por 587 and even just simple SMTP on port 25. Even worse, we still have the old PS 1.7.2.4 server online, on a third machine and it works perfect with 100% same SMTP details. The only diference is that the new 1.7.6.0. is working on Apache over Debian buster and the old 1.7.2.4 is on IIS over Win2016. The debian machine UFW firewall is disable, and even worse i can do a telnet EHLO session with port 587 from the debian machine, so, the problem is not the firewall, the port, the conection, or even the DNS. The problem is something inside PS 1.7.6.0., but i dont know where to look. Is there any place to find a log about SMTP auth? Any ideas? any Help? Thanks. Regards, Mauricio F. Link to comment Share on other sites More sharing options...
mflorezm Posted August 23, 2019 Author Share Posted August 23, 2019 Hi Guys, Is really sad that nobody tried to answer nothing about this issue becuase that make no sense to have a forum, so I found the solutions by myself. The problem was that Swiftmailer (What Prestashop uses for SMTP), was not able to handle my let's encrypt SSL certificated. As it seams, Swiftmailer don't accept self signed SSL certs. I found the solution on this web site: https://github.com/humhub/humhub/issues/3140 Adding next line to \vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\streamBuffer.php $options = array_merge($options, array('ssl' => array('allow_self_signed' => true, 'verify_peer' => false))); //MFM 23/08/2019 SSL email problem Just above if (isset($this->_params['stream_context_options'])) { $options = array_merge($options, $this->_params['stream_context_options']); } Attached is the modified file. Thanks, Mauricio F. StreamBuffer.php 9 Link to comment Share on other sites More sharing options...
Diogo J Posted December 2, 2019 Share Posted December 2, 2019 Thank you for sharing. After updating our server certificate to SECTIGO, we've got into the exact same error. Apparently the swiftmailer certs list is far from being up to date. Glad to have found this topic which allowed us to finally move on after struggling with this for days. Link to comment Share on other sites More sharing options...
zsocialmedia Posted April 10, 2020 Share Posted April 10, 2020 Hello @mflorezm I have same issue.. I did what u wrote here.. and problem still persist. Can u assist ? Thank you Prestashop version 1.7.6.4 Link to comment Share on other sites More sharing options...
mflorezm Posted April 10, 2020 Author Share Posted April 10, 2020 That was several months ago, and i really don't have the problem fresh in my mind to help you right now. What SSL cert brand are you using? doing a fast google research the problem is really not Swiftmailer or let's encrypt SSL cert. The real problem behing is the protocol that your mail server use. Please try to disable TLS1.0, TLS1.1 and SSL3 that are vulnerable on your mail server. As i found in google there is no issues with TL2.0 or TLS3. I did a fresh 1.7.6.4 install last week and this time it is working without doing any changes, so, i'm pretty sure that it is not PS1.7.6.4 problem, that is why i really beleive it is a TLS bad config on your mail server, becuase right now we only use TLS2.0 and TLS3.0 in our mail server, and did not had to modify the above file. BTW, today is my Birthday. Thanks and best regards, MFM 3 1 Link to comment Share on other sites More sharing options...
zsocialmedia Posted April 10, 2020 Share Posted April 10, 2020 Happy birthday @mflorezm I will check to see where is my issue. Thank you for your advice Link to comment Share on other sites More sharing options...
HeineFR Posted June 2, 2020 Share Posted June 2, 2020 Thank you for publishing this solution! I got a similar problem with my smtp transactionnal email provider suddenly on on 2020-05-30 Related with https://support.sectigo.com/articles/Knowledge/Sectigo-AddTrust-External-CA-Root-Expiring-May-30-2020 I just applied the line you where talking about and that work fine. Thanks again Link to comment Share on other sites More sharing options...
slaymesh Posted August 13, 2020 Share Posted August 13, 2020 I know this is an old article but anyone managed to come with proper solution to this ? I actually can't get it working with my let's encrypt SSL on port 587 or 465 but manage to get smtp working through port 25 just fine . Help will be appreciated. Link to comment Share on other sites More sharing options...
nelsondspy Posted December 4, 2020 Share Posted December 4, 2020 (edited) I had a similar problem on Prestashop 1.7.6.4. , with the error "Connection timed out" with particular SMTP settings. Clients such as thunderbird and claws work without problems. Tcpdump shows timeout trying to manage the TLS handshake. Finally decided to use PHP-mail function instead of Swiftmailer: Install Postfix and configure it in relay mode https://www.linode.com/docs/guides/postfix-smtp-debian7 Edit the php-config "sendmail_path = /usr/sbin/sendmail -t -i" Some advantages are : Postfix is easier to test, using the command line and enabling options of debugging. Postfix has a lot of configurable options to accomplish with your SMTP server requirements postfix config I just want to share another approach to solve it (less patiently), if you have a self-manage the server. Edited December 4, 2020 by nelsondspy (see edit history) 1 Link to comment Share on other sites More sharing options...
silapi Posted March 9, 2021 Share Posted March 9, 2021 Hello, In my case, my SMTP server is not using a FQDN so the name on the certificate did not correspond. So I had to add the option 'verify_peer_name' => false to make it work $options = array_merge($options, array('ssl' => array('allow_self_signed' => true, 'verify_peer' => false, 'verify_peer_name' => false))); //MFM 23/08/2019 SSL email problem Link to comment Share on other sites More sharing options...
Nickovitshj Posted May 28, 2021 Share Posted May 28, 2021 Hmm, none of these lines work for me. I have bought a module and only that module has issues sending out mail. But it's clearly having the same kind of issue as is being discussed here, see attached screenshot. I'm guessing it's to do with our SMTP settings. We are using our own mailserver. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now