# \[SOLVED\] Swift mailer not sending embedded images

**URL:** <https://forum.mautic.org/t/solved-swift-mailer-not-sending-embedded-images/26452>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [December 20, 2022, 11:55am UTC](https://forum.mautic.org/t/solved-swift-mailer-not-sending-embedded-images/26452 "2022-12-20T11:55:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avelinohm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/avelinohm/32/997_2.png) [@avelinohm](https://forum.mautic.org/u/avelinohm)\
**Post date:** [December 20, 2022, 11:55am UTC](https://forum.mautic.org/t/solved-swift-mailer-not-sending-embedded-images/26452/1 "2022-12-20T11:55:08Z")

</div>

Mautic 4.4.4  
PHP 8.0.20  
MariaDB 10.5.16

**Updating/Installing Errors**  
I am installing via command line.

_These errors are showing in the installer_  
None

_These errors are showing in the Mautic log_ :  
[2022-12-20 11:30:37] mautic.ERROR: [MAIL ERROR] Connection to tcp://mail1.mhp.es:25 Timed Out Log data: ++ Starting Swift\_Transport\_EsmtpTransport \<\< 220 mail1.mhp.es \>\> EHLO [192.168.200.117] \<\< 250-mail1.mhp.es 250-PIPELINING 250-SIZE 1258291200 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN \>\> STARTTLS \<\< 220 2.0.0 Ready to start TLS \>\> EHLO [192.168.200.117] \<\< 250-mail1.mhp.es 250-PIPELINING 250-SIZE 1258291200 250-VRFY 250-ETRN 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN \>\> AUTH PLAIN \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \<\< 235 2.7.0 Authentication successful ++ Swift\_Transport\_EsmtpTransport started \>\> MAIL FROM:[info@server.es](mailto:info@server.es) \>\> RCPT TO:[randomuser@gmail.com](mailto:randomuser@gmail.com) \>\> DATA \<\< 250 2.1.0 Ok \<\< 250 2.1.5 Ok \<\< 354 End data with . \>\> . !! Connection to tcp://mail.server.es:25 Timed Out (code: 0) (send); [randomuser@gmail.com](mailto:randomuser@gmail.com) {“exception”:“[object] (Swift\_TransportException(code: 0): Connection to tcp://mail.server.es:25 Timed Out\nLog data:\n++ Starting Swift\_Transport\_EsmtpTransport\n\<\< 220 mail1.mhp.es\r\n\n\>\> EHLO [192.168.200.117]\r\n\n\<\< 250-mail.server.es\r\n250-PIPELINING\r\n250-SIZE 1258291200\r\n250-VRFY\r\n250-ETRN\r\n250-STARTTLS\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250 DSN\r\n\n\>\> STARTTLS\r\n\n\<\< 220 2.0.0 Ready to start TLS\r\n\n\>\> EHLO [192.168.200.117]\r\n\n\<\< 250-mail.server.es\r\n250-PIPELINING\r\n250-SIZE 1258291200\r\n250-VRFY\r\n250-ETRN\r\n250-AUTH PLAIN LOGIN\r\n250-AUTH=PLAIN LOGIN\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250 DSN\r\n\n\>\> AUTH PLAIN \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\r\n\n\<\< 235 2.7.0 Authentication successful\r\n\n++ Swift\_Transport\_EsmtpTransport started\n\>\> MAIL FROM:[info@server.es](mailto:info@server.es)\r\n\n\>\> RCPT TO:[randomuser@gmail.com](mailto:randomuser@gmail.com)\r\n\n\>\> DATA\r\n\n\<\< 250 2.1.0 Ok\r\n\n\<\< 250 2.1.5 Ok\r\n\n\<\< 354 End data with .\r\n\n\>\> \r\n.\r\n\n!! Connection to tcp://mail.server.es:25 Timed Out (code: 0) at /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:124, Swift\_IoException(code: 0): Connection to tcp://mail.server.es:25 Timed Out at /var/www/html/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:166)”} {“hostname”:“emm”,“pid”:364739}

I get this error when I try to send medium sized emails (with two images, for example), small sized emails (text only or one small image at most) are sent ok. The Postfix SMTP server has a very large limit for outgoing messages and the “medium sized” emails area 10% size of maximum SMTP message size. Any ideas? Are there any size or content limitations for SMTP transport inside mautic?

_Steps I have tried to fix the problem_ :

- Changing SMTP account, changing port (25, 587, et cetera).
- I have access to Postfix logs, when send is ok I get these logs:

mail postfix/smtpd[7517]: connect from xxx.xxx.xxx.xxx  
mail postfix/smtpd[7517]: Anonymous TLS connection established from xxx.xxx.xxx.xxx: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)  
mail postfix/smtpd[7517]: D923840BEA: client=xxx.xxx.xxx.xxx, sasl\_method=PLAIN, sasl\_username=info  
mail postfix/smtpd[7517]: disconnect from xxx.xxx.xxx.xxx

But when I try to send the medium sized emails, the last line “disconnect” is not shown in mail log.

---

<div class="post-metadata">

**Author:** ![avelinohm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/avelinohm/32/997_2.png) [@avelinohm](https://forum.mautic.org/u/avelinohm)\
**Post date:** [December 20, 2022, 12:48pm UTC](https://forum.mautic.org/t/solved-swift-mailer-not-sending-embedded-images/26452/2 "2022-12-20T12:48:52Z")

</div>

The problem was solved:

The Postfix al STMP server uses Amazon SES as SMTP backend. I “shortcircuited” the Postfix configuring Mautic with an Amazon SES SMTP server and all goes ok!

I think it is a problem with Swift Mailer \<–\> Postfix interaction.

Thank you!
