You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support native transport and other mailer transport options (see #2554)
Description
-----------
| Q | A
| -----------------| ---
| Fixed issues | Fixes #2164
| Docs PR or issue | -
This PR adds support for the `native://default` mailer transport, which uses the PHP `sendmail_path` configuration. Some notes:
* This feature is available in Symfony `5.2.0` and up. Since the `symfony/mailer` dependency is independent from other Symfony packages, it can be allowed to be installed, while everything else stays at Symfony `4.4.*`.
* Since the actual transport factory for the native transport is however defined by the `symfony/framework-bundle`, an additional compiler pass is necessary, to add said transport factory to the container, if supported and not already present. This can be removed once the core requires at least Symfony `5.2.*`.
* Changing the `symfony/mailer` dependency to include `5.2.*` also allows you to use [additional options](symfony/symfony#37432) for your transport (like a local domain for an SMTP relay or a custom sendmail command).
It would be important to include this in the upcoming Contao 4.11 version, as otherwise there exists no possibility of using a custom sendmail command and thus you are stuck with the hardcoded one.
Commits
-------
5ea20a71 support native transport
53836ae6 use class_exists
3bbd552f update ContaoCoreBundleTest
b084330c check for native mailer support in PluginTest too
4df690a8 update AddNativeTransportFactoryPassTest for prefer-lowest
72e72d27 Apply suggestions from code review
Co-authored-by: Leo Feyer <github@contao.org>
ad36b75c merge with master
e98b617f removed superfluous function
1969b8e1 fix merge error
9fbdaf8e CS
49187f05 Merge branch 'master' into use-native-mailer
0 commit comments