MG

Mailgun Configuration

Developer-friendly email service

Mailgun is a developer-centric email service with powerful APIs and excellent deliverability. This guide covers integrating Mailgun with LaravelSMTP.

.env configuration

# LaravelSMTP Mailgun Configuration
LSMTP_PROVIDER=mailgun
LSMTP_FROM_ADDRESS=no-reply@yourdomain.com
LSMTP_FROM_NAME="Your App Name"

# Mailgun Credentials
MAILGUN_DOMAIN=yourdomain.com
MAILGUN_SECRET=your-private-api-key-here

# Mailgun Region (optional)
MAILGUN_ENDPOINT=api.mailgun.net
# For EU: MAILGUN_ENDPOINT=api.eu.mailgun.net

Test your setup

php artisan laravelsmtp:test your-email@domain.com