Config Mailtrap in Laravel 8

Talha Maqsood
2 min readMay 18, 2021

--

Go to the website and signup by using your email

Select the signup method you can signup using google account, github etc.

Mailtrap Signup

I’ll signup by email So, after filling the signup form and checking the recaptcha, click on the confirmation mail that is sent on your email by mailtrap.

So, after confirming the account you will be land on your mailtrap dashboard.

Then, go into the My Inbox

Mailtrap Dashboard

Now, select the technology for which you use the mailtrap, we are using laravel so, select the laravel.

Copy this 6 lines of code and replace these lines in the .env file as it is like:

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=25b738a6fc7347
MAIL_PASSWORD=c744a4d39bbc8b
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=admin@codetechsol.com
MAIL_FROM_NAME="${APP_NAME}"

Save the .env file and clear the configurations. The mailtrap is configured successfully. Now you can receive mail to the mailtrap inbox.

php artisan optimize:clear

I hope it helps!

--

--

Talha Maqsood
Talha Maqsood

Written by Talha Maqsood

Crafting next-level software experiences with Node.js, Laravel, and Blockchain - all while making the complex seem effortless.

No responses yet