Skip to content

Latest commit

 

History

History

mailgun

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Fastify-Mail Plugin with mailgun Example

  • 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 a sandbox testing domain.
    • Add your email to Authorized Recipients.
    • Click on sandbox domain and then click on API.
    • Make note of both your domain and API key.
  • 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.