ATStatus
ATStatus WikiLoading documentation...

SMTP Configuration Guide

Complete guide to configuring email notifications for ATStatus. This guide covers all major email providers with step-by-step instructions.

What is SMTP?

SMTP (Simple Mail Transfer Protocol) is the standard protocol for sending emails. ATStatus uses SMTP to send incident notifications, maintenance alerts, and subscriber updates. You'll need access to an SMTP server to enable email notifications.

Overview

ATStatus supports any SMTP server. This guide provides detailed configuration instructions for the most common email providers. Choose your provider from the list below or use the generic settings for other providers.

Supported Providers

Environment Variables

Add these variables to your .env file to configure SMTP:

VariableDescriptionExample
SMTP_HOSTSMTP server hostnamesmtp.office365.com
SMTP_PORTSMTP server port587
SMTP_SECUREUse SSL/TLS (true for port 465)false
SMTP_USERSMTP username (usually email address)alerts@company.com
SMTP_PASSSMTP password or app passwordyour-app-password
SMTP_FROMSender email addressalerts@company.com
SMTP_FROM_NAMESender display name (optional)Status Alerts

Microsoft 365 / Exchange Online

Best For: Organizations using Microsoft 365, Office 365, or Exchange Online for email.

Step 1: Prepare Your Account

You have two options for authenticating with Microsoft 365:

Option A: App Password (Recommended for Personal Accounts)

  1. Go to Microsoft Account Security
  2. Click Advanced security options
  3. Under "Additional security", enable Two-step verification (required for app passwords)
  4. After enabling 2FA, go back to Advanced security options
  5. Under "App passwords", click Create a new app password
  6. Copy the generated 16-character password immediately (you won't see it again)

Option B: SMTP AUTH with Organization Account

If you're using a Microsoft 365 organization account, your admin may need to enable SMTP AUTH:

  1. Sign in to Microsoft 365 Admin Center
  2. Go to UsersActive users
  3. Select the user account you'll use for sending emails
  4. Click the Mail tab
  5. Under "Email apps", click Manage email apps
  6. Enable Authenticated SMTP
  7. Click Save changes
Security Note: Microsoft 365 organization policies may restrict SMTP authentication. If you encounter authentication errors, contact your IT administrator to verify SMTP AUTH is enabled for your account.

Step 2: Configure ATStatus

Add these settings to your .env file:

# Microsoft 365 SMTP Configuration
SMTP_HOST="smtp.office365.com"
SMTP_PORT="587"
SMTP_SECURE="false"
SMTP_USER="your-email@yourdomain.com"
SMTP_PASS="your-app-password-or-account-password"
SMTP_FROM="your-email@yourdomain.com"
SMTP_FROM_NAME="Status Alerts"
Important: The SMTP_FROM address must match the SMTP_USERaddress. Microsoft 365 does not allow sending from a different address unless you have configured Send As permissions.

Microsoft 365 Troubleshooting

ErrorCauseSolution
Authentication failedWrong password or SMTP AUTH disabledUse app password or enable SMTP AUTH in admin center
5.7.3 Authentication unsuccessfulSecurity defaults blocking SMTPAdmin must disable security defaults or use Conditional Access
Unable to relayFROM address mismatchEnsure SMTP_FROM matches the authenticated user's email
Connection timeoutPort blocked by firewallEnsure port 587 is open on your server/network

Gmail / Google Workspace

Best For: Personal Gmail accounts or organizations using Google Workspace (formerly G Suite).

Step 1: Enable 2-Factor Authentication

App passwords require 2-factor authentication to be enabled:

  1. Go to Google Account Security
  2. Under "How you sign in to Google", click 2-Step Verification
  3. Follow the prompts to enable 2-Step Verification
  4. Choose your preferred verification method (phone, authenticator app, etc.)

Step 2: Create an App Password

  1. Go to Google App Passwords
  2. You may need to sign in again
  3. Under "Select app", choose Other (Custom name)
  4. Enter a name like ATStatus
  5. Click Generate
  6. Copy the 16-character password (spaces don't matter)
App Password Not Available?

If you don't see the App Passwords option, your Google Workspace administrator may have disabled it. Contact your IT administrator to enable "Less secure app access" or app passwords for your organization.

Step 3: Configure ATStatus

# Gmail SMTP Configuration
SMTP_HOST="smtp.gmail.com"
SMTP_PORT="587"
SMTP_SECURE="false"
SMTP_USER="your-email@gmail.com"
SMTP_PASS="xxxx xxxx xxxx xxxx"
SMTP_FROM="your-email@gmail.com"
SMTP_FROM_NAME="Status Alerts"

Alternative: SSL Configuration (Port 465)

# Gmail SMTP with SSL
SMTP_HOST="smtp.gmail.com"
SMTP_PORT="465"
SMTP_SECURE="true"
SMTP_USER="your-email@gmail.com"
SMTP_PASS="xxxx xxxx xxxx xxxx"
SMTP_FROM="your-email@gmail.com"
SMTP_FROM_NAME="Status Alerts"

Google Workspace Additional Steps

If you're using Google Workspace (business), you may need to enable SMTP relay:

  1. Sign in to Google Admin Console
  2. Go to AppsGoogle WorkspaceGmailRouting
  3. Under "SMTP relay service", click Configure
  4. Add a new SMTP relay configuration
  5. Set "Allowed senders" to "Only registered Apps users in my domains"
  6. Enable "Require SMTP Authentication"
  7. Click Save

Gmail Troubleshooting

ErrorCauseSolution
Invalid loginUsing account password instead of app passwordGenerate and use an app password
Application-specific password required2FA enabled but no app passwordCreate an app password in Google Account settings
Username and Password not acceptedApp password typed incorrectlyRegenerate app password and copy exactly
Daily sending limit reachedGmail has sending limits (500/day for free, 2000/day for Workspace)Wait 24 hours or upgrade to Google Workspace

cPanel / Webmail

Best For: Websites hosted on shared hosting with cPanel (common with most web hosts).

Step 1: Find Your SMTP Settings

  1. Log in to your cPanel dashboard
  2. Go to EmailEmail Accounts
  3. Click Connect Devices next to your email account
  4. Note the "Outgoing Server" details

Step 2: Create an Email Account (if needed)

  1. In cPanel, go to EmailEmail Accounts
  2. Click Create
  3. Enter the username (e.g., alerts)
  4. Set a strong password and note it down
  5. Set the mailbox quota (250 MB is usually enough)
  6. Click Create

Step 3: Configure ATStatus

# cPanel SMTP Configuration
SMTP_HOST="mail.yourdomain.com"
SMTP_PORT="587"
SMTP_SECURE="false"
SMTP_USER="alerts@yourdomain.com"
SMTP_PASS="your-email-password"
SMTP_FROM="alerts@yourdomain.com"
SMTP_FROM_NAME="Status Alerts"

Alternative: SSL Configuration (Port 465)

# cPanel SMTP with SSL
SMTP_HOST="mail.yourdomain.com"
SMTP_PORT="465"
SMTP_SECURE="true"
SMTP_USER="alerts@yourdomain.com"
SMTP_PASS="your-email-password"
SMTP_FROM="alerts@yourdomain.com"
SMTP_FROM_NAME="Status Alerts"
Host Variations: The SMTP host varies by hosting provider. Common formats include:
  • mail.yourdomain.com (most common)
  • smtp.yourdomain.com
  • server123.hostingprovider.com (server hostname)
Check your cPanel "Connect Devices" page for the exact hostname.

cPanel Troubleshooting

ErrorCauseSolution
Connection refusedWrong port or server hostnameCheck cPanel "Connect Devices" for correct settings
Authentication failedWrong username or passwordUse full email address as username, reset password if needed
Certificate errorSSL certificate mismatchUse the server hostname instead of your domain name
Mail stuck in queueSending limits exceededContact hosting provider about email limits

DirectAdmin

Best For: Websites hosted on servers using DirectAdmin control panel.

Step 1: Find Your SMTP Settings

  1. Log in to DirectAdmin
  2. Go to Email Manager
  3. Click Email Accounts
  4. Click on your email account
  5. Click Email Client Configuration
  6. Note the SMTP server and port

Step 2: Create an Email Account (if needed)

  1. In DirectAdmin, go to Email ManagerEmail Accounts
  2. Click Create Mail Account
  3. Enter the username (e.g., alerts)
  4. Set a strong password
  5. Set the quota (optional)
  6. Click Create

Step 3: Configure ATStatus

# DirectAdmin SMTP Configuration
SMTP_HOST="mail.yourdomain.com"
SMTP_PORT="587"
SMTP_SECURE="false"
SMTP_USER="alerts@yourdomain.com"
SMTP_PASS="your-email-password"
SMTP_FROM="alerts@yourdomain.com"
SMTP_FROM_NAME="Status Alerts"

With SSL (Port 465)

# DirectAdmin SMTP with SSL
SMTP_HOST="mail.yourdomain.com"
SMTP_PORT="465"
SMTP_SECURE="true"
SMTP_USER="alerts@yourdomain.com"
SMTP_PASS="your-email-password"
SMTP_FROM="alerts@yourdomain.com"
SMTP_FROM_NAME="Status Alerts"

DirectAdmin Troubleshooting

ErrorCauseSolution
Connection timeoutFirewall blocking portContact hosting provider to open SMTP ports
Authentication errorIncorrect credentialsVerify email and password in DirectAdmin
TLS negotiation failedSSL/TLS mismatchTry switching between port 587 (STARTTLS) and 465 (SSL)

Generic SMTP Server

For other SMTP providers, use these general guidelines:

Common Port Settings

PortSecuritySMTP_SECUREDescription
25None/STARTTLSfalseLegacy, often blocked by ISPs
587STARTTLSfalseRecommended for most servers
465SSL/TLStrueImplicit SSL connection
2525STARTTLSfalseAlternative when 587 is blocked

Generic Configuration Template

# Generic SMTP Configuration
SMTP_HOST="smtp.yourprovider.com"
SMTP_PORT="587"
SMTP_SECURE="false"
SMTP_USER="your-username"
SMTP_PASS="your-password"
SMTP_FROM="sender@yourdomain.com"
SMTP_FROM_NAME="Status Alerts"

Email Deliverability

To ensure your status notifications reach recipients and don't end up in spam, configure these DNS records for your sending domain.

SPF Record

SPF (Sender Policy Framework) tells email servers which servers are allowed to send email for your domain.

# Example SPF record (add as TXT record for your domain)
v=spf1 include:spf.protection.outlook.com include:_spf.google.com ~all
Note: Your SPF record should include your email provider's SPF. Check with your provider for the correct include: value.

DKIM (DomainKeys Identified Mail)

DKIM adds a digital signature to your emails to verify they haven't been tampered with. This is usually configured in your email provider's admin panel.

  • Microsoft 365: Enable DKIM in Microsoft 365 Defender → Email authentication
  • Google Workspace: Enable in Admin Console → Apps → Gmail → Authenticate email
  • cPanel/DirectAdmin: Usually auto-configured, check Email Deliverability in your control panel

DMARC Record

DMARC (Domain-based Message Authentication, Reporting & Conformance) tells email servers what to do with emails that fail SPF or DKIM checks.

# Example DMARC record (add as TXT record for _dmarc.yourdomain.com)
v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@yourdomain.com

Testing Your Configuration

After configuring SMTP, test it from the ATStatus admin panel:

  1. Log in to the admin panel at /admin
  2. Go to SettingsNotifications
  3. Look for the Test Email option
  4. Enter a test recipient email address
  5. Click Send Test Email
  6. Check the recipient's inbox (and spam folder)
Success! If the test email arrives, your SMTP configuration is working correctly. If it lands in spam, review the Email Deliverability section above to improve your DNS records.

Common Issues & Solutions

Connection Timeouts

  • Cause: Firewall blocking outbound SMTP ports
  • Solution: Ensure ports 587 and/or 465 are open on your server. Contact your hosting provider if needed.

Authentication Failures

  • Cause: Wrong credentials, using account password instead of app password
  • Solution: Generate a new app password and ensure you're using the full email address as the username.

Certificate Errors

  • Cause: SSL certificate doesn't match the hostname
  • Solution: Use the server's actual hostname instead of your domain (e.g., server123.host.com instead of mail.yourdomain.com)

Emails Going to Spam

  • Cause: Missing or incorrect SPF/DKIM/DMARC records
  • Solution: Configure proper DNS records as described in the Email Deliverability section.

Rate Limiting / Sending Limits

  • Cause: Most email providers limit the number of emails you can send per day
  • Solution: For high-volume notifications, consider a dedicated email service like SendGrid, Mailgun, or Amazon SES.

Security Best Practices

Never Share Credentials: Keep your SMTP credentials secure and never commit them to version control.
  • Use App Passwords: Always use app-specific passwords instead of your main account password
  • Use TLS/SSL: Always use encrypted connections (port 587 with STARTTLS or port 465 with SSL)
  • Dedicated Account: Create a dedicated email account for sending notifications rather than using a personal account
  • Monitor Usage: Regularly check your email account for unusual activity
  • Rotate Credentials: Periodically regenerate app passwords, especially if you suspect they may have been compromised

Next Steps

Once SMTP is configured, you can:

  • Configure notification templates in the admin panel
  • Set up subscriber lists for incident notifications
  • Enable automated incident notifications
  • Test notifications by creating a test incident
Need More Help?

If you're still having trouble with SMTP configuration, check the Troubleshooting Guide or review your email provider's documentation for the most up-to-date settings.