Skip to content

AlexAdvent/nodejs-contact-form

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Handlebars 63.4%
  • CSS 20.8%
  • JavaScript 15.8%