Enabling a Mail Server in Lando

Category
Drupal Version

The Lando Drupal 7 recipe does not come with mail functionality out-of-the-box. However, DrupalEasy has written straight-forward documentation on how to enable server mail functionality.

This is helpful for enabling mail notifications for password resets, trigger/Rules configuration.

Process

  1. Add the following configuration to your .lando.yml recipe:
    proxy:
      mailhog:
        - mail.lemp.lndo.site
    services:
      mailhog:
        type: mailhog
        hogfrom:
          - appserver
  2. Edit mail.lemp.lndo.site to better match, mirror, or apply to your local Lando website.

  3. Run "lando rebuild". Caution should be used when using using the 'rebuild' command, as while most services retain their data during a rebuild, some may not

  4. Running "lando start" will now initialize a Mailhog server, which will siphon all Drupal-generated mail into that inbox.