Mail setup
V1 supports Resend and MailPort. Configure one of them.
Selection rules
MAIL_PROVIDER=resendorMAIL_PROVIDER=mailportselects explicitly- Unset: Resend if complete, otherwise MailPort; if both are complete, Resend wins
- Neither complete:
/api/healthis degraded andsubmitreturnsmail_not_configured
With MODERATION_REQUIRED=false every mail variable is ignored and no email is sent.
Resend
- Sign up at Resend and add your sending domain
- Complete SPF and DKIM verification
- Create an API key
RESEND_FROMmust use the verified domain
MailPort
- Deploy a MailPort instance
- Create a sender in its console and copy the
pid - Generate a 32-character API key for that sender
- Add your moderator email domain to the sender's recipient allowlist
In V1 the MailPort from address is configured in the MailPort console, not passed by this project.
Review email
- Subject:
[评论待审] <post> · <name> - Body: post, name, time, content
- One review link with the credential in the URL fragment, valid for 7 days
Deliverability
Use your own domain, complete SPF/DKIM/DMARC, and send yourself a test first.
V2
V2 will accept a JSON array of providers, try them in order, and support passing from to MailPort. V1 does not read that configuration.
