Mautic Community Forums

The end of Swiftmailer at the end of November 2021

My idea is: Replace Swiftmailer with Symfony Mailer

I think these groups of people would benefit from this idea: Users who send emails via Swiftmailer (SMTP)

Why I think they would benefit from this idea: Since Swiftmailer will be dead soon

Any code or resources to support this idea:

Are you willing to work on this idea?:

What skills and resources do you need to explore this further?


Swiftmailer will no longer be supported after November 2021. Moreover, this is one of the most important components of Mautic. Since this will happen in November, most likely its codebase will not be updated to support PHP 8.1. And this raises concerns, since Swiftmailer has a very old code base, and it is quite possible that some bugs or outdated code will occur even after the release of PHP 8.1 (also in November 2021). And it is quite possible that there are some vulnerabilities that will not be officially fixed.

Therefore, I suggest that the Mautic team start thinking about a solution to this problem in advance. I know that at the moment Mautic still does not support PHP 8.0 in the latest stable version, and all efforts are directed towards the release of version 4.0. Perhaps it will be possible to switch from Swiftmailer to another library (Symfony Mailer?) already in version 4.0?

Welcome @studiomax and thanks for flagging this up!

It is one of the dependencies we have on the list to address, but nobody has actually started to work on this as yet. Likewise with PHP8 we have done a lot of work with Mautic 4 to bump dependencies but we have a couple of dependencies where we are blocked.

Is it something that you might be interested in looking into with the Product Team?

I just looked at the amount of code associated with Swiftmailer (most of it in EmailBundle\Swiftmailer), and apparently this will require refactoring including all transports/email service providers, since they work as transport of Swiftmailer. In my opinion, this will take a HUGE amount of time, and only a couple of people who are core contributors can refactor this. It is quite possible that in the near future no one will do this, but will support their own fork of Swiftmailer.

PS. Personally, as a developer, I do not know the Mautic codebase, as I only fixed a few bugs.

1 Like

OK thanks for taking a look - may well be something that we are not able to address until Mautic 5 but we will definitely keep it on the radar and figure out how we move forward.

1 Like

Tracking this in https://mautic.atlassian.net/browse/TPROD-236 for future reference!