Mail setup

V1 supports Resend and MailPort. Configure one of them.

Selection rules

  1. MAIL_PROVIDER=resend or MAIL_PROVIDER=mailport selects explicitly
  2. Unset: Resend if complete, otherwise MailPort; if both are complete, Resend wins
  3. Neither complete: /api/health is degraded and submit returns mail_not_configured

With MODERATION_REQUIRED=false every mail variable is ignored and no email is sent.

Resend

RESEND_API_KEY=re_xxxxxxxx
RESEND_FROM=GitPigeon <noreply@yourdomain.com>
  1. Sign up at Resend and add your sending domain
  2. Complete SPF and DKIM verification
  3. Create an API key
  4. RESEND_FROM must use the verified domain

MailPort

MAILPORT_BASE_URL=https://mail.yourdomain.com
MAILPORT_PID=a1b2c3
MAILPORT_API_KEY=<32-char key>
  1. Deploy a MailPort instance
  2. Create a sender in its console and copy the pid
  3. Generate a 32-character API key for that sender
  4. 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.