Cmd/Ctrl + K

Mail

Annabel exposes mailers through mailer().

Send a message

Build a message and send it through the default configured mailer.

Transports

Supported transports include array, log, sendmail, and smtp.

Configure mailers in config/mail.php.

Choose a mailer

Select a named mailer when the message should use a non-default transport.

To use the configured default mailer through the manager, call mailer()->mailer()->send($message).

Message API

Messages support sender, recipient, content, and attachment configuration.

A sendable message must have a sender, at least one recipient, and a text or HTML body.

Testing mail

Use the array mailer in tests so sent messages stay in memory: