Configure the Gitea mailer over SMTP
Gitea sends account confirmations, password resets and issue or pull request notifications through the `[mailer]` section of `app.ini`. Set `PROTOCOL` yourself: left empty, Gitea guesses from the port and treats anything other than 25, 465 or 587 (such as 2587) as `smtps`. Set `FROM` too: it defaults to `USER`, and with `USER = unitpost` Gitea refuses to start with `Invalid mailer.FROM (unitpost)`.
Create a send-only key
In Unitpost, open Settings → SMTP and create a send-only key.
FROMmust be an address on a verified domain.Edit app.ini
Gitea only sends credentials over TLS, so use
smtp+starttlson 587 orsmtpson 465.ini[mailer] ENABLED = true PROTOCOL = smtp+starttls SMTP_ADDR = smtp.unitpost.com SMTP_PORT = 587 USER = unitpost PASSWD = pk_live_... FROM = gitea@yourdomain.comFor port 465, set
PROTOCOL = smtpsandSMTP_PORT = 465. Gitea's docs recommend implicit TLS where the server supports it.Restart Gitea
Gitea reads
app.iniat startup, so restart the service or container after editing it.Send a testing email
Sign in as an admin and open Site Administration → Configuration → Summary. Under Mailer Configuration, enter your address next to Send Testing Email and click Send.
If it fails
unable to infer unspecified mailer.PROTOCOLin the log meansPROTOCOLis empty on a nonstandard port.535 5.7.8meansUSERisn'tunitpost.550 5.7.1meansFROMisn't on a verified domain.