.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
Mail driver to use. Options:
smtp, mailgun, postmark, ses, sendmail, logFrom Address
.env
Email address that appears as the sender.
Name that appears as the sender in email clients.
SMTP Configuration
SMTP Parameters
SMTP server hostname.
SMTP server port. Common values:
25- Standard SMTP (often blocked)587- SMTP with STARTTLS (recommended)465- SMTP over SSL
SMTP authentication username.
SMTP authentication password.
Encryption method. Options:
tls, ssl, or leave empty for none.EHLO Domain
.env
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
Path to the sendmail binary with arguments.
Testing Email Configuration
After configuring email settings, test the connection:- Prompt you for mail settings
- Send a test email
- Verify the configuration works
Manual Test
You can also send a test email using Tinker:Troubleshooting
Emails Not Sending
-
Check your mail logs:
-
Verify queue workers are running (if using queues):
-
Test SMTP connectivity:
Common Issues
Connection Refused
Connection Refused
- 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
Authentication Failed
Authentication Failed
- Double-check username and password
- For Gmail, use an App Password instead of your regular password
- Verify two-factor authentication settings
Emails Go to Spam
Emails Go to Spam
- Set up SPF, DKIM, and DMARC records for your domain
- Use
MAIL_EHLO_DOMAINmatching your panel’s domain - Ensure
MAIL_FROM_ADDRESSuses your domain - Consider using a dedicated email service (Mailgun, Postmark, SES)
SSL Certificate Verification Failed
SSL Certificate Verification Failed
- 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
tlsinstead ofssl
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.
