Email setup
For administrators: send email with Gmail, Microsoft 365, SMTP2GO, Brevo, SES, Mailgun or your own server.
castgate sends a few emails: password reset links, prayer requests to churches, weekly audience reports to owners, and alerts to administrators (for example when the disk is nearly full). It sends them through an SMTP mail service you already have or sign up for. Nothing else is needed on the server.
The quick way
- Open Admin → Settings, section Email.
- Choose your service in Mail service: the server and port are filled in.
- Enter the user and password the service gave you (see below for each service).
- From address: an address of a domain you are allowed to send from, for example
Grace Live <live@gracechurch.org>. - Save settings, then Send a test email (to yourself, or type another address).
- If it fails, the message under the button says why and what to change.
Which service to choose
| Service | Good for | Cost (check the service's site) | Server and port |
|---|---|---|---|
| SMTP2GO | The simplest dedicated service, reliable delivery | free plan for small volumes | mail.smtp2go.com, 587 (or 2525) |
| Brevo | Easy, generous free plan | free plan for small volumes | smtp-relay.brevo.com, 587 |
| Gmail / Google Workspace | You already use Google | included, with daily sending limits | smtp.gmail.com, 587 |
| Microsoft 365 / Outlook.com | You already use Microsoft | included, with daily sending limits | smtp.office365.com, 587 |
| Amazon SES | Large volumes, lowest price | pay per email | email-smtp.REGION.amazonaws.com, 587 |
| Mailgun | Developers, detailed logs | trial, then paid | smtp.mailgun.org, 587 |
| Your own server (Postfix) | You run mail yourself | free | localhost, 25 |
For most churches and small providers, SMTP2GO or Brevo is the easiest: a few minutes to set up and good delivery.
SMTP2GO
- Sign up at smtp2go.com.
- Sending → Verified Senders: add your domain (recommended: it adds SPF/DKIM records you put in your DNS) or a single sender address.
- Sending → SMTP Users: add a user; note the user name and password.
- In castgate: Mail service SMTP2GO, user and password from step 3, From address on the verified domain.
Brevo
- Sign up at brevo.com.
- Senders, domains & dedicated IPs: add and verify your sender or domain.
- SMTP & API → SMTP: note the login (an address like
abc123@smtp-brevo.com) and create an SMTP key. - In castgate: Mail service Brevo, user = the SMTP login, password = the SMTP key.
Gmail or Google Workspace
- The Google account needs 2-Step Verification on (myaccount.google.com → Security).
- Create an app password: myaccount.google.com → Security → App passwords → name it "castgate" → copy the 16 letters.
- In castgate: Mail service Gmail, user = your full Gmail address, password = the app password (without spaces).
- The From address must be your Gmail address (or an alias set up in Gmail).
- Google limits how many emails an account may send per day. That is plenty for password resets and reports; for thousands of messages, use a dedicated service.
Microsoft 365 or Outlook.com
- In the Microsoft 365 admin center: Users → Active users → the mailbox → Mail → Manage email apps: tick Authenticated SMTP. (Your organization may have SMTP AUTH turned off globally; an administrator can turn it on for one mailbox.)
- With multi-factor authentication on, create an app password for the mailbox (My Account → Security info → Add method → App password). If app passwords are disabled in your organization, use SMTP2GO or Brevo instead.
- In castgate: Mail service Microsoft 365, user = the full mailbox address, password = the app password.
- The From address must be that mailbox (or one it may send as).
- castgate uses the LOGIN sign-in method automatically when the server offers only that, as Microsoft's does.
Amazon SES
- In the AWS console open Amazon SES in your region (for example US East, N. Virginia).
- Verified identities: verify your domain (add the DKIM records to DNS).
- New accounts are in the sandbox (they can send only to verified addresses): request production access in the SES console.
- SMTP settings → Create SMTP credentials: note the SMTP user name and password (these are not your AWS keys).
- In castgate: Mail service Amazon SES, change the server's region if yours is not
us-east-1(for exampleemail-smtp.eu-west-1.amazonaws.com), user and password from step 4.
Mailgun
- Sign up at mailgun.com and add your sending domain (put its DNS records in place and verify).
- Sending → Domain settings → SMTP credentials: note the login (
postmaster@your-domain) or create one, and its password. - In castgate: Mail service Mailgun (
smtp.mailgun.org; for EU accounts usesmtp.eu.mailgun.org), user and password from step 2.
Your own mail server
If the castgate server already runs Postfix (or another mail server) that relays mail for it, choose This server: localhost, port 25, no user or password. castgate trusts the local connection. Make sure the domain of your From address has SPF and DKIM records for this server, or messages will land in spam.
Getting into the inbox, not spam
- Send from a domain you own and have verified with the mail service.
- Add the SPF and DKIM records the service gives you to your domain's DNS; add a DMARC record (
v=DMARC1; p=none; rua=mailto:you@your-domain) to start. - Use a recognisable From name, for example
Grace Church Live <live@gracechurch.org>. - castgate adds the Date and Message-ID headers that mail services expect, and marks its messages as automatic.
When the test fails
| The message says | Do this |
|---|---|
| refused the user name or password | For Gmail and Microsoft 365, use an app password; check the user is the full address; for Microsoft 365 turn on Authenticated SMTP |
| refused the From address | Use an address on a domain you verified with the service |
| No answer from the mail server (timeout) | Your hosting provider blocks the port: try 2525 or 587, or ask them to open it |
| refused the connection on this port | Wrong port: 587 for most services, 465 for SSL |
| server name does not exist | A typing mistake in the server name |
| secure connection failed | Use the service's own server name and port 587 or 465 |
| does not offer encryption | Use port 587 or 465 (castgate does not send passwords unencrypted) |
This guide is also in the castgate package as docs/EMAIL.md.