- 🇺🇸United States mrweiner
It seems that #8 no longer works as expected on platform.sh. I'm now getting an error
Error sending email: The "sendmail://:?command=%2Fusr%2Fsbin%2Fsendmail+-t+-i+-t" mailer DSN is invalid.
. It seems like they've maybe added-t -t
to their sendmail path. However, just using ini_get('sendmail_path') doesn't work either. Not sure what's going on...maybe an encoding issue? - 🇪🇸Spain joe_carvajal Seville (Spain)
Thank you @mrweiner for #8 and #16 for the platform.sh config. They made my day.
- 🇮🇹Italy kopeboy Milan
Emails are not sent if on local with ddev.
They add these settings automatically (at present):// Override drupal/symfony_mailer default config to use Mailhog $config['symfony_mailer.mailer_transport.sendmail']['plugin'] = 'smtp'; $config['symfony_mailer.mailer_transport.sendmail']['configuration']['user']=''; $config['symfony_mailer.mailer_transport.sendmail']['configuration']['pass']=''; $config['symfony_mailer.mailer_transport.sendmail']['configuration']['host']='localhost'; $config['symfony_mailer.mailer_transport.sendmail']['configuration']['port']='1025';
With mailhog module disabled, emails are not sent.
If you comment out all those ddev settings, flush cache, and I try sending the test email, you get error:
Error sending email: Connection to "process /usr/sbin/sendmail -bs" has been closed unexpectedly.
- 🇺🇸United States jcmartinez Raleigh, NC, USA
If you work inside Lando or another similar environment, your localhost may have a different name.
In my case, using Lando, this is how I make it work:
// To use Symfony Mailer with Mailhog locally. $config['symfony_mailer.mailer_transport.sendmail']['configuration']['query']['command'] = ini_get('sendmail_path') . ' -t'; $config['symfony_mailer.mailer_transport.sendmail']['plugin'] = 'smtp'; $config['symfony_mailer.mailer_transport.sendmail']['configuration']['user']=''; $config['symfony_mailer.mailer_transport.sendmail']['configuration']['pass']=''; $config['symfony_mailer.mailer_transport.sendmail']['configuration']['host']='mailhog'; $config['symfony_mailer.mailer_transport.sendmail']['configuration']['port']='1025';