Skip to content

Introduction ​

Mailroom is a Laravel mail driver that stores outgoing mail in your database, plus a mailbox at /mailroom to read it.

MAIL_MAILER=log flattens a message into a log line and throws away the attachments. MAIL_MAILER=array forgets everything at the end of the request. Mailroom keeps the whole thing: full MIME, attachments, embedded images, tags, metadata, custom headers. And it gives you somewhere to look at it.

The Mailroom mailbox: a sidebar of mailboxes and people, the message list, and an open message

What gets captured ​

Everything Laravel's mail layer can produce. Mailroom hooks in as a Symfony transport rather than an event listener, so it sees the finished message:

  • HTML and text bodies, from views, markdown, htmlString or Mail::raw()
  • Attachments via attach(), attachData(), fromStorage() and the rest, byte for byte
  • Inline images from $message->embed(), kept separate from real attachments
  • Cc, Bcc, Reply-To, and the envelope recipients actually delivered to
  • Tags and metadata (TagHeader / MetadataHeader)
  • Custom headers set through withSymfonyMessage()
  • Queued mailables, multiple mailers, Mail::alwaysTo()

Where to next ​

Released under the MIT License.