Jump to content
thirty bees forum
  • 0

Outgoing email (SMTP) doesn't work, due to mismatch in certifate Common Name (CN)


Question

Posted

I migrated from TB 1.1 to 1.5, quite  succesfully so far. I'm only lost in getting the outgoing email to work again. I configured the PHPMailer. But when sending a test email I get the following error message: 

Failed to send email: SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): Peer certificate CN=`*.exacthost.nl' did not match expected CN=`mail.gquipment.com'

I also checked the email database settings but can't find a reference to 'exacthost.nl'. But to be honest, I don't understand what the problem is.

What can I do?

11 answers to this question

Recommended Posts

  • 0
Posted

Turned out that the server name I used was not correct.  Problem solved. Now I only have to fight he  usual "Failed to send email: SMTP Error: Could not connect to SMTP". I  used a multistore  config and I noticed  that in the database the shop instance specific credentials are old ones. It is not clear how that is possible but at least I know where to look 🙂

  • 0
Posted

Yes, I'm  aware, but I  still don't get it going, pfff. I'm pretty sure I use correct credentials, server name, connection type and  port number (I double checked it with  the hosting provider).  And I know the PHPmail module is flawless. I'm afraid that the problem is with what is stored in the database. There are multiple entries without shop-id. I'm using  shop-id=2 (I have two shops but only use one actively). The info for shop-id=2 looks good though. I'll attach a screen shot.

But those empty fields, would that be a problem? And one must be aware what shop is selected when configuring the outgoing email.Capture2.PNG.95133976b5b96906fb98af574370a245.PNG

  • 0
Posted

Still looking for the cause of this problem. Which code is activated when I press the test email button in the back office? Maybe I can figure it out from there. I'm getting that desperate 🙂

  • 0
Posted

In the end, it was a configuration error at the email service provider. Nothing wrong with TB PHPMail, as  expected 🙂

  • 0
Posted
On 6/17/2024 at 11:22 AM, Dolfijn said:

In the end, it was a configuration error at the email service provider. Nothing wrong with TB PHPMail, as  expected 🙂

Are you able to share what the configuration error was? I'm unable to receive emails from my site, even though TB syas they are sent . If you know what configuration changess your host made, that could help others.

  • 0
Posted

Hello

I just installed TB 1.5.1 and updated to latest development version. I use PHP-FPM 8.3 on almalinux 9, apache 2.4.56 + nginx 1.26.2, on a VPS with enough RAM and CPUs

All seems to be working quite well although I did not configure Nginx as recommended by Datakick Yet, i will look into that later on)

I read the news about the mailing modules, PHPMailer and Swiftmailer, and read that into TB it is recommended to use PHPMailer.

So having to chose one to go I tried first with PHPMailer

I got same problem as read above using both phpmailer or swiftmailer using SMTP.

I could send test emails only with swiftmailer using the PHP's mail() function

With both modules using SSL I get:

Failed to send email: SMTP Error: Could not connect to SMTP host.

Using TLS (which I know that can't work on my server, but tried anyway to see what was going to happen...) I get this error

Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

I read the whole discussion here, I could not find helpful hints.

I triple checked the smtp credentials, which btw work on other software using SSL, eg. in Thunderbird.

I imagine the problem is on the server side, but I am not expert, I do not know where exactly look at to find the cause for this problem.

Does anyone know what should be done to solve this?

Thank you in advance for info and help.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...