symfony / swiftmailer-bundle

Symfony Swiftmailer Bundle
https://symfony.com/swiftmailer-bundle
MIT License
1.56k stars 151 forks source link

Use sendmail_path as default value #302

Closed fritzmg closed 4 years ago

fritzmg commented 4 years ago

Quite some time ago, Swiftmailer dropped support for the PHP mail function for security reasons and thus forcing you to use either sendmail or smtp. However, when using sendmail, The Swiftmailer Bundle only uses a hard coded command by default, which might not work on all hosting environments out of the box. The PHP mail function on the other hand uses the configured sendmail_path of the PHP configuration, which most likely will work in the respective hosting environment.

This PR simply uses the configured sendmail_path as the default value for the command parameter of the bundle configuration. Therefore emails should work again out of the box, just like it was before when Swiftmailer still supported PHP mail.

Kind of like the poor-man's version of https://github.com/symfony/symfony/pull/36131 ;)

fabpot commented 4 years ago

Thank you @fritzmg.