An email error occurred:SMTP connect() failed.

Hi Everyone,
I am using suitecrm 7.11. 18 . I am trying to configure the email module it showing a error.

An email error occurred:SMTP connect() failed.

Please help me on this.

When you are sending the Test email, and there is an error, the pop-up message includes a link saying something like “show full SMTP log” which should contain additional clues.

Today morning.

3: Connection: opening to ssl://, timeout=300, options=array()
3: Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol [/Applications/MAMP/htdocs/CRM/Suitecrm710/vendor/phpmailer/phpmailer/src/SMTP.php line 380]
3: Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [/Applications/MAMP/htdocs/CRM/Suitecrm710/vendor/phpmailer/phpmailer/src/SMTP.php line 380]
3: Connection failed. Error #2: stream_socket_client(): unable to connect to ssl:// (Unknown error) [/Applications/MAMP/htdocs/CRM/Suitecrm710/vendor/phpmailer/phpmailer/src/SMTP.php line 380]
1: SMTP ERROR: Failed to connect to server: (0)
3: SMTP connect() failed.

I have no idea what that error is, I’ve never seen it before. But now with that error you should be able to Google for solutions. It’s something about SSL configuration, maybe a missing update of certificates. Make sure you are up-to-date in your PHP version and modules (max PHP version for SuiteCRM is 7.3)

Yes, I using latest version of PHP.

You can’t use latest version of PHP, you have to say at most in 7.3

okay. I am using PHP 7.4.2.

Start by fixing that (downgrade PHP to 7.3) and then check again if there are errors.

I have downgraded my .php to 7.3 . I get that same SMTP connect ()failed …
I have upgraded to the latest Suite CRM.
I have another project management system uploaded to my server. No problems with
sending emails there.
So someone must know how to get the email functions working. It has to be
a coding mistake and the correct code must be somewhere.
Otherwise a good program.

May you have the correct email setting.
But the problem comes from “selinux”, disabled to fix.

Hi @kumaran3657 ,
I think you need to apply APP Password SMTP configure setting. this error shown when you are typing a wrong credential.
Here is the Video :- How to Bypass 2 step verification for Third-Party Apps using App Password - YouTube

Guide to IMAP and SMTP Server Settings

I just downloaded the 8.2.1 version and I am currently using th latest version of PHP. I had the same error “An email error occurred:SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub” After I enabled encryption over SSL the test email sent immediately. I also was able to send another after that Not sure if this helps but…