▶Stream4US

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

  1. Open Admin → Settings, section Email.
  2. Choose your service in Mail service: the server and port are filled in.
  3. Enter the user and password the service gave you (see below for each service).
  4. From address: an address of a domain you are allowed to send from, for example Grace Live <live@gracechurch.org>.
  5. Save settings, then Send a test email (to yourself, or type another address).
  6. If it fails, the message under the button says why and what to change.
Use port 587 (STARTTLS) unless the service says otherwise; 465 is the SSL port; 2525 is an alternative when your hosting provider blocks 587. castgate never sends the password over an unencrypted connection.

Which service to choose

ServiceGood forCost (check the service's site)Server and port
SMTP2GOThe simplest dedicated service, reliable deliveryfree plan for small volumesmail.smtp2go.com, 587 (or 2525)
BrevoEasy, generous free planfree plan for small volumessmtp-relay.brevo.com, 587
Gmail / Google WorkspaceYou already use Googleincluded, with daily sending limitssmtp.gmail.com, 587
Microsoft 365 / Outlook.comYou already use Microsoftincluded, with daily sending limitssmtp.office365.com, 587
Amazon SESLarge volumes, lowest pricepay per emailemail-smtp.REGION.amazonaws.com, 587
MailgunDevelopers, detailed logstrial, then paidsmtp.mailgun.org, 587
Your own server (Postfix)You run mail yourselffreelocalhost, 25

For most churches and small providers, SMTP2GO or Brevo is the easiest: a few minutes to set up and good delivery.

SMTP2GO

  1. Sign up at smtp2go.com.
  2. Sending → Verified Senders: add your domain (recommended: it adds SPF/DKIM records you put in your DNS) or a single sender address.
  3. Sending → SMTP Users: add a user; note the user name and password.
  4. In castgate: Mail service SMTP2GO, user and password from step 3, From address on the verified domain.

Brevo

  1. Sign up at brevo.com.
  2. Senders, domains & dedicated IPs: add and verify your sender or domain.
  3. SMTP & API → SMTP: note the login (an address like abc123@smtp-brevo.com) and create an SMTP key.
  4. In castgate: Mail service Brevo, user = the SMTP login, password = the SMTP key.

Gmail or Google Workspace

  1. The Google account needs 2-Step Verification on (myaccount.google.com → Security).
  2. Create an app password: myaccount.google.com → Security → App passwords → name it "castgate" → copy the 16 letters.
  3. In castgate: Mail service Gmail, user = your full Gmail address, password = the app password (without spaces).
  4. The From address must be your Gmail address (or an alias set up in Gmail).
  5. 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

  1. 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.)
  2. 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.
  3. In castgate: Mail service Microsoft 365, user = the full mailbox address, password = the app password.
  4. The From address must be that mailbox (or one it may send as).
  5. castgate uses the LOGIN sign-in method automatically when the server offers only that, as Microsoft's does.

Amazon SES

  1. In the AWS console open Amazon SES in your region (for example US East, N. Virginia).
  2. Verified identities: verify your domain (add the DKIM records to DNS).
  3. New accounts are in the sandbox (they can send only to verified addresses): request production access in the SES console.
  4. SMTP settings → Create SMTP credentials: note the SMTP user name and password (these are not your AWS keys).
  5. In castgate: Mail service Amazon SES, change the server's region if yours is not us-east-1 (for example email-smtp.eu-west-1.amazonaws.com), user and password from step 4.

Mailgun

  1. Sign up at mailgun.com and add your sending domain (put its DNS records in place and verify).
  2. Sending → Domain settings → SMTP credentials: note the login (postmaster@your-domain) or create one, and its password.
  3. In castgate: Mail service Mailgun (smtp.mailgun.org; for EU accounts use smtp.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 saysDo this
refused the user name or passwordFor 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 addressUse 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 portWrong port: 587 for most services, 465 for SSL
server name does not existA typing mistake in the server name
secure connection failedUse the service's own server name and port 587 or 465
does not offer encryptionUse port 587 or 465 (castgate does not send passwords unencrypted)

This guide is also in the castgate package as docs/EMAIL.md.