Problem/Motivation
Symfony Mailer library now recommends Sendmail, and avoiding Native.
Proposed resolution
- Create Sendmail transport. Use a settings.php variable
mailer_sendmail_commandsto specify available commands (otherwise can execute arbitrary shell commands). - Add warning to Native transport
- Change default configuration to Sendmail
- Update hook: if the automatically created Native transport still exists, delete it and replace with Sendmail
- Create Null transport
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | symfony_mailer.sendmail.3274465-5.patch | 1.74 KB | adamps |
| #2 | symfony_mailer.sendmail.3274465-2.patch | 11.52 KB | adamps |
Comments
Comment #2
adamps commentedComment #4
adamps commentedComment #5
adamps commentedSmall correction
Comment #6
adamps commentedComment #9
super_romeo commentedTo send mails to Mailhog on dev-enviroment:
settings.local.php:id=mailhogand selectCommand=usr/sbin/sendmail -i -S -t mailhog:1025.settings.local.php:Comment #10
alex g commentedJust in case someone is using laragon on Windows you can use something similar to the below:
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['query']['command'] = ini_get('sendmail_path') . ' -t';
$settings['mailer_sendmail_commands'] = [
ini_get('sendmail_path') . ' -t'
];