Where to configure it
In the dashboard, open your app and go to Settings → Alert Channels → New Channel → Email. You’ll need six fields:| Field | Notes |
|---|---|
| Host | Provider’s SMTP hostname. |
| Port | 465 for SSL, 587 for TLS, 25 for unauthenticated (rarely used today). |
| Username | Usually your full email address or an API-key username. |
| Password | SMTP password or app-specific password. Encrypted at rest. |
| Encryption | tls (STARTTLS on 587) or ssl (SMTPS on 465). |
| From address | The From: header on the alert email. Must be an address the provider lets you send as. |
Gmail (personal or Google Workspace)
Gmail is the most common request, and also the trickiest because Google disabled basic password auth in 2022. You need an App Password, not your regular Google password.1. Enable 2-Step Verification
App Passwords require 2-Step Verification on the Google account.- Go to myaccount.google.com/security.
- Under How you sign in to Google, enable 2-Step Verification if it’s not already on.
2. Generate an App Password
- Visit myaccount.google.com/apppasswords.
- Name it something identifiable — e.g. “NightOwl alerts”.
- Click Create. Google shows a 16-character password once. Copy it immediately; it won’t be shown again.
If the App Passwords page is missing, your account doesn’t have 2-Step Verification enabled, or your Workspace admin has disabled the feature. Ask your admin to allow App Passwords, or use a relay like SendGrid / SES instead.
3. Fill in the NightOwl form
465 with ssl — both work. Use whichever your firewall allows.
4. Send a test
Click Send test in the dashboard. The email should land within a few seconds. If it doesn’t:- Check spam. First-time senders to a recipient often land there.
- Check the error banner. NightOwl surfaces the SMTP error verbatim —
535 Username and Password not acceptedmeans the App Password is wrong or was mistyped with spaces. - Sending limits. Gmail caps outbound at ~500 recipients/day for personal accounts and ~2,000/day for Workspace. For teams with chatty alerts, switch to SendGrid or SES.
Workspace with a custom domain
If your Gmail account isyou@yourcompany.com on Google Workspace, the config is identical — still smtp.gmail.com:587 with an App Password. The From: address just becomes you@yourcompany.com. Workspace admins can also set up SMTP relay on smtp-relay.gmail.com for higher volume, which avoids per-user App Passwords.
Other common providers
SendGrid
apikey.
Postmark
Amazon SES
Mailgun
Deliverability checklist
Even with working SMTP credentials, alerts can land in spam without proper DNS setup. For any custom domain on any provider:- SPF — a TXT record listing the provider’s sending hosts (e.g.
v=spf1 include:_spf.google.com ~allfor Workspace). - DKIM — signing keys published as TXT records. Every major provider generates these automatically and gives you a CNAME or TXT to add.
- DMARC — a TXT record at
_dmarc.yourdomain.comtelling receivers what to do with unaligned mail (start withp=nonefor monitoring, tighten later).
Troubleshooting
535 Authentication failed / Username and Password not accepted
535 Authentication failed / Username and Password not accepted
For Gmail: you used your normal password instead of an App Password, or the App Password was copied with spaces. Regenerate and paste without whitespace.For other providers: the credentials are wrong, the account is suspended, or the API key doesn’t have Mail Send permission.
Connection timeout on port 587 or 465
Connection timeout on port 587 or 465
Your server’s outbound firewall blocks the port. Try the other port (587 ↔ 465). On managed hosts like DigitalOcean droplets, port 25 is usually blocked by default but 587 is open.
Test email succeeds but real alerts never arrive
Test email succeeds but real alerts never arrive
The test uses the same dispatch path as real alerts, so credentials are fine. Look in spam/junk, check that your recipient list is correct on the channel, and verify DMARC/SPF alignment for the From address.
Alerts arrive but marked as spam
Alerts arrive but marked as spam
Missing or misconfigured SPF/DKIM. Run the From domain through mxtoolbox.com/deliverability and fix anything flagged. A warmup period is also normal for a brand-new sending domain.
Gmail says 'Less secure app access' is off
Gmail says 'Less secure app access' is off
That setting is gone as of 2024. You must use 2FA + App Passwords, or switch to OAuth (not currently supported by NightOwl’s SMTP channel — use a relay like SES or SendGrid instead).
Security notes
- Passwords are encrypted at rest with Laravel’s
Cryptfacade, keyed offAPP_KEY. They’re decrypted only in memory at dispatch time. - Rotating an SMTP password doesn’t invalidate pending alerts — they’re sent in real time, not queued with cached credentials.
- If you revoke an App Password or API key, the next alert will fail loudly (visible in the dashboard’s channel error banner) rather than silently dropping.