Email Sending & MailDev Workflow

This environment routes all transactional mail through the local MailDev SMTP sink so we can test WooCommerce notifications without delivering anything to real customers.

Architecture Overview

Because MailDev captures messages in-memory, nothing leaves the workstation. When you need to resend email through a real ESP (SendGrid, SES, etc.), swap the WP Mail SMTP settings.

Verifying the Configuration

1. Inspect WP Mail SMTP options

cd /mnt/SSD1/mrepos/bitbucket.org/wilsonify/renewed-renaissance-woocommerce
docker compose run --rm wordpress wp option get wp_mail_smtp

You should see mailer => smtp, host => maildev, port => 1025, and auth => false. If not, apply the default profile:

docker compose run --rm wordpress wp option update wp_mail_smtp '{"mail":{"from_email":"[email protected]","from_name":"Renewed Renaissance","mailer":"smtp","return_path":true,"from_email_force":true,"from_name_force":false},"smtp":{"host":"maildev","port":1025,"encryption":"none","autotls":false,"auth":false,"user":"","pass":""},"general":{"summary_report_email_disabled":false}}' --format=json

2. Run the WP-CLI doctor check

docker compose run --rm -e WP_CLI_PACKAGES_DIR=/var/www/html/.wp-cli/packages wordpress \
  wp doctor check wp-mail-smtp-mailer --config=wpdoctor/doctor.yml

A success status confirms the MailDev mailer is wired up.

3. Send a test email

  1. Browse to https://www.renewed-renaissance.com/wp-admin/admin.php?page=wp-mail-smtp-tools&tab=test
  2. Send a test message to any address.
  3. Open http://localhost:31080 to view the MailDev inbox.

Troubleshooting Checklist

SymptomChecks
No emails appear in MailDev docker compose ps maildev (should be Up), then docker compose logs maildev --tail=200.
WP Mail SMTP warns "mailer setup incomplete" Re-run the option update command or configure the plugin through the admin UI.
Test email fails with connection errors Confirm wordpress container can resolve maildev: docker compose exec wordpress ping -c1 maildev.
Need to deliver real emails Replace SMTP settings with your production ESP credentials, revert to MailDev afterward.

Operational Tips