Starting Swift_SmtpTransport

Hi everyone,

What is the cause of the following error message:

“Unable to connect with TLS encryption Log data: ++ Starting Swift_SmtpTransport << 220-35-236-118-198.cprapid.com ESMTP Exim 4.96 #2 Mon, 31 Jul 2023 14:55:26 -0700 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. >> EHLO mautic.devced.com << 250-35-236-118-198.cprapid.com Hello mautic.devced.com [35.236.118.198] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-PIPECONNECT 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP >> STARTTLS << 220 TLS go ahead !! Unable to connect with TLS encryption (code: 0)
++ Starting Swift_SmtpTransport << 220-35-236-118-198.cprapid.com ESMTP Exim 4.96 #2 Mon, 31 Jul 2023 14:55:26 -0700 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. >> EHLO mautic.devced.com << 250-35-236-118-198.cprapid.com Hello mautic.devced.com [35.236.118.198] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-PIPECONNECT 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP >> STARTTLS << 220 TLS go ahead !! Unable to connect with TLS encryption (code: 0)”

See the screenshot error message:

Swift_SmtpTransport is used by Mautic as a tls transport. Swift_SmtpTransport is no longer available, according to this GitHub issue: Swift_MailTransport deprecated · Issue #866 · swiftmailer/swiftmailer · GitHub
If so, might we substitute something like symfony/mailer, available at Sending Emails with Mailer (Symfony Docs)?

What do you recommend as the troubleshooting steps to isolate this issue?


Regards,
Hal

Hi everyone,

The SuPHP and LSAPI /home/$USERNAME/public_html/error_log as the error log.

/public_html/mautic.devced.com/error_log:

“[01-Aug-2023 15:14:28 UTC] PHP Warning: stream_socket_enable_crypto(): Peer certificate CN=35-236-118-198.cprapid.com' did not match expected CN=imap.devced.com’ in /home/mautic/public_html/mautic.devced.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php on line 94.”

/home/mautic/public_html/mautic.devced.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php on line 94":

“{
// STREAM_CRYPTO_METHOD_TLS_CLIENT only allow tls1.0 connections (some php versions)
// To support modern tls we allow explicit tls1.0, tls1.1, tls1.2
// Ssl3 and older are not allowed because they are vulnerable
// @TODO make tls arguments configurable
return stream_socket_enable_crypto($this->stream, true, STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT);
},” PHP Error Log · GitHub

Is the certificate bad?

Regards,
Hal