Transports
The null transport is the default, which means a fresh installation silently drops mail until SMTP is configured. That’s deliberate: it keeps a half-configured installation from emailing real users.
See Mailer settings and SMTP for the administrator side.
Sending
sendTemplate() takes one address or several, a template name, optional data and optional attachments. Every option is merged into the template data automatically, so templates can read option.site.name, brand settings and policy links without the caller passing them.
The sender comes from option.mail.from.address and option.mail.from.name.
Templates
Templates live inresources/emails and are registered as the @emails Twig namespace.
See Email templates for more details.
What triggers mail
Transactional mail is sent by event listeners rather than by request handlers:
Because listeners run inside the request that dispatched the event, a slow or unreachable SMTP server slows that request down. Keep timeouts short, and prefer a nearby relay.
Sending from a plugin
Inject the service and render your own template through your namespace:Testing
- Point SMTP at a local catcher, such as Mailpit or MailHog, while developing.
- With the null transport, messages are logged rather than sent: check
var/log/app-*.log. - Verify the “from” address is one your provider allows, or messages will be rejected or filtered.