Skip to main content
Pterodactyl Panel uses email for user notifications, password resets, and administrative alerts. Configure your preferred mail provider in the .env file.

Supported Mail Drivers

The Panel supports multiple mail drivers:
  • SMTP - Standard SMTP server (recommended for most users)
  • Mailgun - Mailgun API
  • Postmark - Postmark API
  • SES - Amazon Simple Email Service
  • Sendmail - Local sendmail binary
  • Log - Write emails to log files (development only)

Basic Configuration

Mail Driver Selection

.env
string
default:"smtp"
Mail driver to use. Options: smtp, mailgun, postmark, ses, sendmail, log

From Address

.env
string
required
Email address that appears as the sender.
Use a valid email address from your domain to prevent emails from being marked as spam.
string
default:"Pterodactyl Panel"
Name that appears as the sender in email clients.

SMTP Configuration

SMTP Parameters

string
required
SMTP server hostname.
integer
default:"25"
SMTP server port. Common values:
  • 25 - Standard SMTP (often blocked)
  • 587 - SMTP with STARTTLS (recommended)
  • 465 - SMTP over SSL
string
SMTP authentication username.
string
SMTP authentication password.
string
default:"tls"
Encryption method. Options: tls, ssl, or leave empty for none.

EHLO Domain

.env
string
Domain used in the SMTP EHLO/HELO command. Set this to your panel’s domain to prevent mail servers like Gmail from rejecting your emails.
If not set, defaults to the server’s hostname which may be ‘localhost’.

Mailgun Configuration

You’ll need to install the Mailgun PHP SDK:

Postmark Configuration

.env
You’ll need to install the Postmark PHP SDK:

Amazon SES Configuration

.env
You’ll need to install the AWS SDK:

Sendmail Configuration

.env
string
default:"/usr/sbin/sendmail -bs -i"
Path to the sendmail binary with arguments.

Testing Email Configuration

After configuring email settings, test the connection:
This interactive command will:
  1. Prompt you for mail settings
  2. Send a test email
  3. Verify the configuration works

Manual Test

You can also send a test email using Tinker:

Troubleshooting

Emails Not Sending

  1. Check your mail logs:
  2. Verify queue workers are running (if using queues):
  3. Test SMTP connectivity:

Common Issues

  • Verify the SMTP host and port are correct
  • Check if your firewall allows outbound connections on the SMTP port
  • Ensure the SMTP service is running on the remote server
  • Double-check username and password
  • For Gmail, use an App Password instead of your regular password
  • Verify two-factor authentication settings
  • Set up SPF, DKIM, and DMARC records for your domain
  • Use MAIL_EHLO_DOMAIN matching your panel’s domain
  • Ensure MAIL_FROM_ADDRESS uses your domain
  • Consider using a dedicated email service (Mailgun, Postmark, SES)
  • Ensure your server has up-to-date CA certificates
  • Update ca-certificates package: apt-get update && apt-get install ca-certificates
  • For self-signed certificates, consider using tls instead of ssl

Security Best Practices

Use TLS Encryption

Always use MAIL_ENCRYPTION=tls or ssl in production to encrypt email traffic.

Dedicated Email Service

Consider using dedicated services like Mailgun or Postmark for better deliverability.

Valid From Address

Use a real email address from your domain to improve deliverability and avoid spam filters.

DNS Records

Configure SPF, DKIM, and DMARC records to authenticate your emails.