- Issue created by @tcrawford
Symfony mailer lite is used as the mailer and this is configured to use dsn 'smtp://mailpit:1025'. This is correct for lando and not ddev.
The ddev overrides for mailpit in settings.ddev.php are suitable for symfony mailer, but not symfony mailer lite.
Although not the cause, the settings.local.php also have inconsistent settings for symfony mailer that refer to mailhog.
Run ./scripts/local/init-project.sh (ddev
DDEV provides mailsetting overrides in settings.ddev.php for symfony mailer (and not symfony mailer lite).
Attempt a password reset
Password reset not sent via mailpit
Options:
1. Add a configuration override to settings.local.php (patch below),
2. Change the default and add an override for lando.
2. Switch to symfony mailer (instead of symfony mailer lite). Allows the mail system module to be removed and arguably is a better default for a new project.
Patch to correct the override if staying with symfony mailer lite.
diff --git a/drupal/docroot/sites/default/settings.local.php b/drupal/docroot/sites/default/settings.local.php
index 3ccc340..3bd4d75 100644
--- a/drupal/docroot/sites/default/settings.local.php
+++ b/drupal/docroot/sites/default/settings.local.php
@@ -161,4 +161,9 @@
$config['rokka.settings']['organization_name'] = 'starterkit-local';
## Symfony Mailer DSN Settings
-$config['symfony_mailer.mailer_transport.dsn']['configuration']['dsn'] = 'smtp://mailhog:1025';
+# Override the mail dsn (for symfony mailer lite) if using DDEV.
+# DDEV auto generated settings (settings.ddev.php) only override
+# settings for symfony mailer (not symfony mailer lite).
+if (getenv('IS_DDEV_PROJECT') === 'true') {
+ $config['symfony_mailer_lite.symfony_mailer_lite_transport.dsn']['configuration']['dsn'] = 'smtp://localhost:1025';
+}
. Switch the default mailer in the starter
Decide on the option and open an MR.
None.
None.
None.
Active
1.0
Code