Mailhog In Lando, With Symfony Mailer Module

Mailhog is a tool for testing emails.

To configure for lando:

proxy:
  mailhog:
    - mailhog.SITENAME.lndo.site
services:
  mailhog:
    type: mailhog
    hogfrom:
      - appserver

 

After lando rebuild, everything will be configured for the internal connection.

The Symfony Mailer transport needs to be configured, but first add the command to settings.php.

$settings['mailer_sendmail_commands'] = [
  ini_get('sendmail_path') . ' -t'
];

The sendmail_path setting is set automatically by lando, but this step is required to allow the mhsendmail command to be selected.

Image
Drupal symfony mailer configure mailhog transport
Tags
Email Lando
Modules