iam-msm / ajax-contact-form

A basic contact form - built using phpmailer and the jquery validate and form plugins.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ajax-contact-form

A basic contact form built using phpmailer and the jQuery validate and form plugins.

Features

This project has the following functionality:

  • Validated on both the client and server sides.
  • Submitted via ajax, displays status messages without page reload.
  • Still works with javascript disabled.
  • Email is submitted using SMTP over SSL
  • Easy configuration file (default set-up is for a gmail account).
  • I've added some basic exception handling, but it could probably be better.

How To Use

  1. Open includes/config.php and set your configuration options. I STRONGLY recommend that you move the includes folder to a more secure location for production use. You will need to update the file paths in process.php accordingly.
  2. The default options assume a gmail account, check with your hosting provider if you need the details for a different email server.
  3. You may receive an email from gmail asking you to confirm that the access was legitimate the first time the script is run.
  4. Gmail will re-write the From: HTTP header to your own email address. This cannot be overriden. To get around this you will need to send from a different email address.

References

About

A basic contact form - built using phpmailer and the jquery validate and form plugins.

License:MIT License