Reservations made on the website are now saved: Pippin added the traveler's email address and the day of the visit to the form. One thing is missing, the house's good manners: a confirmation scroll, sent for every reservation.
Mailer
The Mailer component sends emails through a transport, chosen by the MAILER_DSN variable: smtp://… in production, a service like Mailgun or Brevo, or null://null, which sends nothing at all. That is the case here: no scroll ever really leaves the tavern. So that you can read them, Pippin keeps a copy of every scroll sent in the 📬 Mailbox (/mailbox, in development only).
In the code, you build an Email and hand it over to MailerInterface. The transport changes nothing in the code.
Your mission
- After every saved reservation, send a scroll to the given address, with the subject “Your table at the Drunken Dragon”. The text mentions the name, the number of adventurers and the date (
September 18, 2026). - Every scroll from the tavern comes from The Drunken Dragon Tavern <tavern@drunken-dragon.me>. Set it once and for all in
config/packages/mailer.yaml, not in the controller. - An invalid address is rejected (422), with a message that mentions the “address”.
- A rejected reservation sends nothing.
To try it out: book a table in the preview, then open the mailbox.