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.
Quite some time ago, Swiftmailer dropped support for the PHP
mail
function for security reasons and thus forcing you to use eithersendmail
orsmtp
. However, when usingsendmail
, The Swiftmailer Bundle only uses a hard coded command by default, which might not work on all hosting environments out of the box. The PHPmail
function on the other hand uses the configuredsendmail_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 thecommand
parameter of the bundle configuration. Therefore emails should work again out of the box, just like it was before when Swiftmailer still supported PHPmail
.Kind of like the poor-man's version of https://github.com/symfony/symfony/pull/36131 ;)