Environment Variables
Copy
BACKEND_MAIL_HOST=mail.example.com
BACKEND_MAIL_PORT=465
BACKEND_MAIL_SECURE=true
BACKEND_MAIL_SENDER=noreply@company.com
BACKEND_MAIL_SENDER_NAME=noreply
BACKEND_MAIL_AUTH_USER=username
BACKEND_MAIL_AUTH_PASS=usertoken
Examples
AWS SES Configuration
Copy
# How to obtain: Login to AWS Console → Simple Email Service → SMTP Settings → Create SMTP Credentials
BACKEND_MAIL_HOST=email-smtp.us-east-1.amazonaws.com # Replace with your region
BACKEND_MAIL_PORT=465
BACKEND_MAIL_SECURE=true
BACKEND_MAIL_SENDER=noreply@yourdomain.com # Must be a verified sender address
BACKEND_MAIL_SENDER_NAME=System Notification
BACKEND_MAIL_AUTH_USER=your_smtp_username # AWS SMTP username
BACKEND_MAIL_AUTH_PASS=xxxxxxxxxxxxxx # AWS SMTP password
Gmail Configuration
Copy
# How to obtain: Google Account → Security → 2-Step Verification → App Passwords
BACKEND_MAIL_HOST=smtp.gmail.com
BACKEND_MAIL_PORT=465
BACKEND_MAIL_SECURE=true
BACKEND_MAIL_SENDER=you@gmail.com
BACKEND_MAIL_SENDER_NAME=System Notification
BACKEND_MAIL_AUTH_USER=you@gmail.com
BACKEND_MAIL_AUTH_PASS=xxxxxxxxxxxxxx # 16-digit app password
Microsoft 365 / Outlook Configuration
Copy
# How to obtain: Microsoft 365 admin center → Security → Policies & rules → Email authentication
BACKEND_MAIL_HOST=smtp.office365.com
BACKEND_MAIL_PORT=587
BACKEND_MAIL_SECURE=true
BACKEND_MAIL_SENDER=your.name@yourdomain.com
BACKEND_MAIL_SENDER_NAME=System Notification
BACKEND_MAIL_AUTH_USER=your.name@yourdomain.com
BACKEND_MAIL_AUTH_PASS=xxxxxxxxxxxxxx # Your Microsoft 365 password or app password if MFA is enabled
SendGrid Configuration
Copy
# How to obtain: SendGrid Dashboard → Settings → API Keys → Create API Key
BACKEND_MAIL_HOST=smtp.sendgrid.net
BACKEND_MAIL_PORT=465
BACKEND_MAIL_SECURE=true
BACKEND_MAIL_SENDER=noreply@yourdomain.com
BACKEND_MAIL_SENDER_NAME=System Notification
BACKEND_MAIL_AUTH_USER=apikey
BACKEND_MAIL_AUTH_PASS=xxxxxxxxxxxxxx # Your SendGrid API Key