Config Mailtrap in Laravel 8
Go to the website and signup by using your email
Select the signup method you can signup using google account, github etc.
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
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=tlsMAIL_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!