Mailtrap 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 AdonisJs application.
To create an account, go to https://mailtrap.io.
After you log in successfully, the homepage will appear.
Next, click on the settings button. 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=smtp SMTP_HOST=smtp.mailtrap.io MAIL_USERNAME= MAIL_PASSWORD=
Paste your Mailtrap username and password that you copied earlier in front of
MAIL_PASSWORD, respectively. Save the .env file and try to send an email from the AdonisJs application. The email should appear in your Mailtrap inbox.
View all Courses