Back to top
Add the Mailhog service to Your .lando.yml File
First, add the following configuration to your .lando.yml file to set up the Mailhog service.
services:
mail:
type: mailhog
hogfrom:
- appserver
proxy:
mail:
- mail.lndo.siteBack to top
Modify your settings.local.php
Next, update your settings.local.php file to configure the mailer sendmail command.
$settings['mailer_sendmail_commands'] = [
ini_get('sendmail_path') . ' -t',
];Back to top
Configure the Symfony Mailer Module
Finally, add a new transport method for the Symfony Mailer module configuration. Navigate to /admin/config/system/mailer/transport and add a new Sendmail Tranport type.
Make sure to select the command you entered in settings.local.php
With these configurations, you'll have Mailhog set up and ready to capture outgoing emails, making your development process more efficient and debugging email-related issues much easier.
Back to top