Where to configure it
In the dashboard, open your app and go to Settings → Alerts. In the Email section, click Configure SMTP (or Add another if the app already has an email channel). The form has these fields:
After saving, open the channel again with its pencil and click Send Test to send a test email. A successful test confirms your credentials and
From: setup are valid. The test is sent from NightOwl’s servers, though, while new-issue, reopened and health alerts are sent by the agent running on your host. So a passing test does not, by itself, guarantee those alerts will arrive. Run php artisan nightowl:test-alert on the server that runs the agent to test that path (see Testing a channel).
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
Save the channel, open it again with its pencil, and click Send Test. The email should land within a few seconds. If it doesn’t:- Check spam. First-time senders to a recipient often land there.
- Read the error. A failed test shows a red toast with the SMTP server’s reply.
535 Username and Password not acceptedmeans the App Password is wrong or was pasted 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.
php artisan nightowl:test-alert on the server that runs the agent, since that’s where new-issue alerts are sent from.
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
Relays without authentication
An internal relay that accepts mail without a login needs no username or password. Leave both fields empty: the agent then sends noAUTH command.
Two things to know about private relays:
- Send test can’t reach them. Send test runs on NightOwl’s servers, which only connect to public SMTP hosts. For a private or local host it replies that it can’t reach the host and points you to
php artisan nightowl:test-alert, which sends through the agent on your server. - Some alerts come from NightOwl’s servers. Alerts for issues someone resolves, ignores or reopens are sent by NightOwl’s API, so they won’t reach a private relay. New-issue, auto-reopened and agent health alerts come from the agent and will.
AUTH, the agent still tries AUTH LOGIN, since some relays accept it without announcing it. If that fails too, the error says so and tells you to clear the username and password to send without logging in. When the server offers STARTTLS, it also suggests setting encryption to TLS, because some servers only offer AUTH after STARTTLS.
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 host’s outbound firewall blocks the port. New-issue and health alerts are sent from the machine running the agent, so the relevant firewall is yours, not NightOwl’s. A Send test that succeeds from NightOwl’s servers won’t catch this;
php artisan nightowl:test-alert on that machine will. Try the other port (587 ↔ 465), and remember to switch encryption to match (587→tls, 465→ssl). On managed hosts like DigitalOcean droplets and many cloud VMs, port 25 is blocked by default but 587 is usually open; some providers block all outbound SMTP until you open a support request.Test email succeeds but real alerts never arrive
Test email succeeds but real alerts never arrive
Send test and real alerts take different paths: the test is sent from NightOwl’s servers, while new-issue alerts are sent by the agent on your own host with a stricter SMTP client. Run
php artisan nightowl:test-alert on that host: it sends through the agent’s own client and prints the error for any channel that fails. A passing dashboard test rules out wrong credentials and a bad From: address, but two things it does not rule out:- Outbound SMTP blocked on your host. Your host’s firewall (or your cloud provider) blocks outbound 587/465. The test still works because it leaves NightOwl’s infrastructure, not yours. Confirm with
nc -vz smtp.yourprovider.com 587from the box running the agent. - Port/encryption mismatch.
587withssl, or465withtls, may pass the lenient test path but fail from the agent. Set587→tlsand465→ssl.
From address.Send test says it can't reach your SMTP host
Send test says it can't reach your SMTP host
Send test runs on NightOwl’s servers, which only connect to public SMTP hosts, so a private, local or unresolvable host is refused there. Alerts the agent sends don’t have this limit. Test that path with
php artisan nightowl:test-alert on the server that runs the agent. See Relays without authentication.A username is set but the server does not advertise AUTH
A username is set but the server does not advertise AUTH
The relay accepts mail without a login. Clear the username and password on the channel and save. If the server offers STARTTLS, try encryption
TLS first: some servers only offer AUTH after STARTTLS.A recipient isn't accepted
A recipient isn't accepted
Recipients must be members of the app’s team, matched without regard to case. Invite the address to the team first, then add it to the channel.
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
- SMTP credentials are stored as plain JSON in the
nightowl_alert_channelstable in your own database, because the agent on your server reads them to send alerts. Anyone who can read that table can read them. The dashboard shows the password masked and never sends it back. - When you change the password in NightOwl, a running agent uses the new one within about 30 seconds.
- If you revoke an App Password or API key, the next alert fails. The agent writes the SMTP error to its error log, and
php artisan nightowl:test-alertshows it.