Laravel 5.7 Mailgun Configuration

Last Updated on

Configuring Laravel to use Mailgun is easy. We only need an account at mailgun.com and, for testing, some authorized recipient email addresses.

Laravel Configuration

We have the following mail configuration in the .env file.

These values are available in your mailgun account.

For example:

Authorized Recipients

For testing, we are using a sandbox domain and email recipients have to authorize your account to send them emails.

Sample Codes

PHP Codes


Sample Email Received

Email received

Email Details


Karl San Gabriel

Karl San Gabriel

Professional Software Developer