# "SMTP on Zerops" ## Keywords smtp, email, mail, sendgrid, mailgun, ses, gmail, port 587, starttls, send email ## TL;DR Only port **587** (STARTTLS) is allowed for outbound email — ports 25 and 465 are permanently blocked. Use an external email service. ## Port Configuration | Port | Status | Protocol | |------|--------|----------| | 25 | **Blocked** | Traditional SMTP (spam risk) | | 465 | **Blocked** | Legacy SMTPS (deprecated) | | **587** | **Allowed** | SMTP submission with STARTTLS | ## Provider Configurations | Provider | Host | Port | Username | Password | |----------|------|------|----------|----------| | Gmail | smtp.gmail.com | 587 | user@gmail.com | App password | | Google Workspace | smtp-relay.gmail.com | 587 | user@domain.com | Regular/App pass | | Office 365 | smtp.office365.com | 587 | user@domain.com | Account password | | SendGrid | smtp.sendgrid.net | 587 | `apikey` | API key | | Mailgun | smtp.mailgun.org | 587 | postmaster@domain | Password | | Amazon SES | `email-smtp.{region}.amazonaws.com` | 587 | Access key | Secret key | ## Configuration Example ```yaml envVariables: SMTP_HOST: smtp.sendgrid.net SMTP_PORT: "587" SMTP_USER: apikey envSecrets: SMTP_PASSWORD: ``` ## Gotchas 1. **Port 25 is permanently blocked**: Cannot be unblocked — use 587 with STARTTLS 2. **Port 465 is also blocked**: Legacy SMTPS is deprecated — use 587 3. **Gmail needs App Password**: Regular Gmail passwords won't work — generate an App Password in Google Account settings ## See Also - zerops://guides/firewall - zerops://guides/environment-variables