-
Fork and clone fastify-mail repo.
-
Install dependencies:
npm i
-
change directory to
examples/mailgun
and install dependencies:cd examples/mailgun npm i
-
Signup or login to mailgun
- From the side navigation bar, click on
Sending
- you should see asandbox
testing domain. - Add your email to Authorized Recipients.
- Click on
sandbox
domain and then click onAPI
. - Make note of both your domain and API key.
- From the side navigation bar, click on
-
Copy env example:
cp .env.example .env
-
Update variables with information collected from mailgun.
-
Run the example.
npm start
-
Send a GET request to
localhost:3000/sendmail
. -
Open the email inbox you listed as an authorized recipient to view test email.
mailgun
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||