# Starting Swift\_SmtpTransport

**URL:** <https://forum.mautic.org/t/starting-swift-smtptransport/28786>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [July 31, 2023, 10:16pm UTC](https://forum.mautic.org/t/starting-swift-smtptransport/28786 "2023-07-31T22:16:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [July 31, 2023, 10:16pm UTC](https://forum.mautic.org/t/starting-swift-smtptransport/28786/1 "2023-07-31T22:16:27Z")

</div>

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](http://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](http://mautic.devced.com) \<\< [250-35-236-118-198.cprapid.com](http://250-35-236-118-198.cprapid.com) Hello [mautic.devced.com](http://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](http://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](http://mautic.devced.com) \<\< [250-35-236-118-198.cprapid.com](http://250-35-236-118-198.cprapid.com) Hello [mautic.devced.com](http://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:

 ![2023-07-31 15.00.49 mautic.devced.com f235e9eb6ab1](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/8063484facccff4c99eb5ded93d2668adf8d9e06.png)

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](https://github.com/swiftmailer/swiftmailer/issues/866#issuecomment-275647080)  
If so, might we substitute something like symfony/mailer, available at [Sending Emails with Mailer (Symfony Docs)](https://symfony.com/doc/current/mailer.html)?

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

–  
Regards,  
Hal

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [August 1, 2023, 9:42pm UTC](https://forum.mautic.org/t/starting-swift-smtptransport/28786/2 "2023-08-01T21:42:36Z")

</div>

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](http://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](https://gist.github.com/DevCEDTeam/3a4ff6fe85332c9c717b5f5c5b84de61)

Is the certificate bad?

Regards,  
Hal
