Setting Up an Email Form With Node.js, Express, and Mailgun Part 2

Setting Up Our App

after touch, we enter the names of each file and their extensions separated by a space

Nodemailer, Nodemailer-mailgun-transport, and Express

The -S saves the packages as dependencies
The versions are listed after the dependencies, these may vary depending on when you read this blog


Running Our Server

Note the console.logged message at the bottom of the terminal that we had written in our server.js file.
The rendered index.html file we wrote

Sending Data To The Server

Making Our Form

Written in JQuery
Create a data object and pass it to .post
It works!

Sending to Our Email Address

Using Our Message

Subject and text can be written in as single words because of ES6 syntax


Put It To Good Use



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aidan McBride

Aidan McBride

I ‘m a Web Developer and a Flatiron coding bootcamp alumni. I currently work in the financial tech industry as a Front End Engineer