Mailtrap is an email delivery platform to test, send, and control the email infrastructure performance. Mailtrap email testing is a fake SMTP server that comes in handy when catching test emails sent during development and staging.
Follow the steps below to set up Mailtrap for an
To create an account, go to https://mailtrap.io.
After you log in successfully, the following homepage will appear:
Next, click on the “Start Testing” button under “Email Testing”. The following will appear:
Then, click on “Show Credentials” and copy the username and password.
Add the following to the .env file of your application:
MAIL_CONNECTION=smtpSMTP_HOST=smtp.mailtrap.ioMAIL_USERNAME= // Username goes hereMAIL_PASSWORD= // Password goes here
Paste your Mailtrap username and password you copied earlier in front of MAIL_USERNAME
and MAIL_PASSWORD
, respectively. Save the .env file and try to send an email from the AdonisJS application. The email should appear in your Mailtrap email testing inboxes.