Skip to content
 
 

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Contact Form

Contact form build with Bootstrap and Nodemailer

Demo page

Demo Page

Installation

  1. Install the dependencies and start the server.
$ git clone https://github.com/rezkyfm/nodejs-contact-form.git
$ cd nodejs-contact-form
$ npm install && npm start
  1. Open in browser
http://localhost:3000

Configuration

Open config.js

/* 
config.js
*/
module.exports = {
    // Theme
    theme: "lightBlue",

    // Email notifier account (sender)
    host: "smtp.mailtrap.io", // Sender email smtp
    port: "465", // Sender email port
    user: "username", // Sender email username
    pass: "password", // Sender email password

    // Your email to receive notification (receiver)  
    from: '"Contact Me" <noreply@example.com>', // Sender email address
    to: 'email@example.com', // Your email address
    subject: 'Contact Us', // Subject
};

Gmail SMTP Setup

  1. Setup app password for gmail
  2. Open app.js and change
let transporter = nodemailer.createTransport({
        host:  config.host,
        port: config.port,
        secure: false,
        auth: {
                user: config.user,
                pass: config.pass
        },
        tls:{
            rejectUnauthorized:false
        }
});
  1. replace to
let transporter = nodemailer.createTransport(
    `smtps://${config.user}:${config.pass}@smtp.gmail.com`
);

Theme Screenshoot

lightBlue

lightBlue

darkSky

darkSky

About

Contact us form build with Bootstrap and Nodemailer

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages