Skip to content

Mail ​

Evolve sends mail for a handful of features and applies one safety rule on top: outside live and local development, no message reaches a real recipient. This page covers what is sent, how the mailer is configured, and what happens to a message on each environment.

What sends mail ​

FeatureRecipientsTrigger
Form submissions (leads)the form's admin address, else the notification address; optionally a confirmation to the sendera visitor submits a form
Event registrationsthe admin address of the form attached to the event, else the notification address, plus a confirmation to the participanta visitor registers for an event
User invitations and magic linksthe invited or requesting userinvite sent from the panel, magic link requested on the login screen
Health checkfailures to the alert address; the daily test mail to HEALTH_CHECK_EMAIL_RECIPIENT, else the alert addressthe scheduled checks, see Health Checks
Shopifythe customerabandoned checkout recovery, back in stock notifications

All of them go through Laravel's mailer, so the configuration and the environment rule below apply to every one of them.

Addresses 2.18 ​

The Mail tab of the settings panel keeps five addresses in the settings store. Each field shows the stored value; its placeholder names what an empty field inherits from the .env.

Setting.env fallbackUsed for
Sender name and addressMAIL_FROM_NAME, MAIL_FROM_ADDRESSthe From of every mail. Never a recipient.
Reply-toEVOLVE_MAIL_REPLY_TO_ADDRESSReply-To of mails to visitors when the form sets none; unset means the sender.
Notification addressEVOLVE_MAIL_NOTIFICATION_ADDRESSinternal recipient of new leads and event registrations when the form has no admin address
Alert addressHEALTH_WEBMASTER_ADDRESStechnical alerts: health check failures, the fallback for the daily test mail

Who receives a new lead:

  1. The form's admin address, when set.
  2. Otherwise the notification address.
  3. Otherwise nobody: the internal notification is skipped and a warning is logged. The visitor's confirmation still goes out.

Before 2.18 the third case mailed the sender address, which on many sites is a no-reply mailbox nobody reads. Set the notification address on every site where some forms have no admin address. The form list in the panel shows each form's effective recipient, or a "No recipient" badge.

The store is shared by every environment that shares the database. A database copy brings the live addresses to staging, where the mail redirect catches them anyway.

Configuring the mailer ​

The Mail tab writes the transport to the .env of the running instance:

SettingKeyNotes
MailerMAIL_MAILERone of the mailers declared in config/mail.php, typically smtp, log, or a provider such as brevo
SMTPMAIL_HOST, MAIL_PORT, MAIL_SCHEME, MAIL_USERNAME, MAIL_PASSWORDused when the mailer is smtp

Each environment has its own .env and its own transport; changing the mailer on the live panel does not touch staging and vice versa. php artisan evolve:env:diff shows which keys differ across environments.

The installer seeds a local .env with MAIL_MAILER=smtp, host localhost, port 1025, which is where Mailpit listens on a Herd or Valet machine. Nothing leaves the machine.

What happens per environment ​

The environment type (EVOLVE_ENV_TYPE, or inferred from APP_ENV when unset, see Environments) sets the default:

TypeOutgoing mail
livedelivered to the real recipients
stagingevery message is redirected to EVOLVE_MAIL_REDIRECT, until a developer switches the site to real recipients in the Developers tab
developmentdelivered as configured, normally into Mailpit or the log mailer

The redirect happens at send time, in a MessageSending listener, so it covers queued mail, notifications and module mailables alike. The message keeps its subject and body; To, Cc and Bcc are replaced by the single redirect address, and the original recipients are preserved in an X-Original-To header. Every redirect writes an info line to the log.

Three details worth knowing:

  1. EVOLVE_MAIL_REDIRECT defaults to dev@racerfish.com. Set it per project if the redirected mail should land somewhere else.
  2. If a protected environment has an empty EVOLVE_MAIL_REDIRECT, the message is cancelled and a warning is logged. Nothing is sent.
  3. EVOLVE_MAIL_SAFETY overrides the type in both directions: false lets a staging site send real mail for a dress rehearsal, true catches mail on a live or development site. Unset means the type decides.

A developer sets all of this in the Developers tab of the panel (Mail safety card); admins configure how mail is sent in the Mail tab, the type and the developer decide to whom.

Verifying delivery ​

The mailer health check probes the transport every hour and sends one real test mail a day to HEALTH_CHECK_EMAIL_RECIPIENT, falling back to the alert address and never to the sender. Its meta lists the sender, notification and alert address with the source of each (settings or config). On staging the check is subject to the redirect like everything else, so the test message lands at EVOLVE_MAIL_REDIRECT, not at the recipient configured for the check. Details on Health Checks.