Skip to content

vbb08/Contact-Form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Contact-Form

HTML contact form via PHPMailer, using Gmail account.

Requirements:

  • PHPMailer
  • Gmail account credentials

Setup Instructions

    $mail->isSMTP();                              //Send using SMTP
    $mail->Host       = 'smtp.gmail.com';       //Set the SMTP server to send through
    $mail->SMTPAuth   = true;             //Enable SMTP authentication
    $mail->Username   = '###############@gmail.com';   //SMTP write your email
    $mail->Password   = '#################';      //SMTP password
    $mail->SMTPSecure = 'ssl';            //Enable implicit SSL encryption
    $mail->Port       = 465;   
    $mail->addAddress('##############@gmail.com');     //Add a recipient email
  • Run contact form.html and visit your local host

My personal working contact form can be checked here

Below, contact form and email received examples displayed:

contact form email