Setup MailTrap in Laravel
We get a lot of email, mail notifications from different websites on a daily basis. While implementing this feature in our websites or Laravel projects we need to test them locally in our development environment. In this scenario Mailtrap is a very useful service. Mailtrap is a fake SMTP server test. It allows developers to view, share emails sent from the development staging environments. Without sending to real users we can test email notifications from our application with MailTrap. To create an account in Mailtrap visit the link https://mailtrap.io. You can sign up using your google account or GitHub account or create a new password with your email address. You will need to create an inbox after logging in. You will get an email address to which you can send notification emails.
Now you need to add MailTrap to your Laravel app by editing your .env file and adding mailtrap details.
MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=yourMailtrapUsername MAIL_PASSWORD=yourMailtrapPassword MAIL_ENCRYPTION=tls
Replace ‘yourMailtrapUsername’, ‘yourMailtrapPassword’ with your original Mailtrap username and password. Save your .env file. Let’s test email by sending an email from your application. Your email will appear in your Mailtrap inbox.
sam smith
16 Apr 2023
I just want the whole world to know about this spell caster I met two weeks ago, I cannot say everything he has done for me my wife left me 3 years ago left with my kids I was going through online when I meant this wonderful man's testimony online I decided to give it a try and my wife is back to me now and we are happily married again cause is too much to put in writing all I can say is thank you very much am very happy Contact him today on oseremenspelltemple@gmail.com or whatsapp him on +2348136482342. www.facebook.com/Dr-odion-spell-temple-110513923938220