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

Server.js

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

Notes

Put It To Good Use

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

… in JavaScript aka Spread Syntax

FOS: Static File Serving and ExpressJS Emulation

Biweekly Report — II : The coding period Begins……

Big O Notation Understood

What are HTTP and WebSocket and When to Use One Over Another?

Open Source — React Native Ticker

Blog Post 303

Best use of NavigationExtras in Angular 7 plus

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

More from Medium

Playing with Nodejs :( First Step to Node ✔💻

Minima NodeJS — with examples

A quick explanation of Node.js and related web frameworks, mainly Koa.js

Express Server Setup for Beginners