Mail Overview
Sending emails is handled asynchronously. The CLI creates a SendEmailWorkflow
that runs a SendEmailActivity
using the mail.Sender
to deliver messages.
A mailer is a set of related email actions. Each mailer is a struct implementing an interface in internal/types/mailer.go
so it can be easily mocked. The methods start the workflow with the correct message parameters.
Generate a mailer and an action with:
bin/goframe generate mailer <mailer name> <action>
This command creates the mailer file, the views for HTML and text formats, and updates the registry so the constructor is wired into fx
.
Last updated on