Contact Form for Websites using PHP, Bootstrap, and Google SMTP Free Download


This is a simple PHP Program called Contact Form for websites. This web application demonstrates the Contact Form feature of a website which allows the site's visitors to reach out or send a message to the site management. It is developed using PHP, Bootstrap 5.3 Framework, and Google SMTP. The main purpose of this program is to provide students or new programmers with a reference for learning to create a contact form for their project. The source code can be also used for your current project.

What is Contact Form on a website?

A brief web form is published on a website and is called a contact form. Any visitor can fill out the form and submit it to send a message to the site owner or management. Your contact form causes an email to be generated and delivered to your email address in the background.

Why do we need to implement Contact Form for websites?

Developers or site owners implement or add the Contact Form as an additional feature or page to their site to provide their visitors a way to contact them for comments, questions, or any inquiries regarding the site or content of the site. With this, we can also simply limit also the data that we need or want to be provided by the visitors.

Features and Functionalities

The Contact Form source code that I am providing is a straightforward web program that contains the following features and functionalities.

  • Contact Form Page
  • Send Message as Mail to the Receiver Email
  • Using Google SMTP
  • Using Bootstrap 5.3 Framework for the Design
  • Prevents the Visitor to edit or re-submit the form while the process is on-going

What are the Technologies used?

This Contact Form program source code was developed using the following technologies.

  • VS Code Editor
  • PHP
  • HTML
  • CSS
  • JavaScript
  • Google Fonts
  • Google Icons
  • Google SMTP


Here are some snapshots of the program:

Contact Form using PHP and Google SMTP

Contact Form using PHP and Google SMTP

The Contact Form Program source code zip is provided on this website and is free to download. The download button is located below this article's content. Follow the instruction below for running the program on your local machine using XAMPP.

How to Run?


  • Download and Install any local web server such as XAMPP.
  • Download the provided source code zip file. (download button is located below)

System Installation/Setup

  1. Open your php.ini file in a text editor and set up the Google SMTP like the following image.

    XAMPP PHP INI Mail Setup

  2. Open your sendmail.ini file in a text editor and set up the mailing settings like the following image.

    XAMPP PHP INI Mail Setup

  3. Open your XAMPP Control Panel and start Apache.
  4. Extract the downloaded source code zip file.
  5. Copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory.
  6. Browse the Contact Form Program in a browser. i.e. http://localhost/php-contact/.


That's it! You can now test the Contact Form Program on your end. I hope this Contact Form for Websites using PHP, Bootstrap, and Google SMTP Source Code will help you with what you are looking for and will be useful for your current and future PHP Projects.

Explore more on this website for more Tutorials and Free Source Codes.

Happy Coding =)

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Submitted byAL-gawhara (not verified)on Mon, 02/27/2023 - 12:17

Hello bro can u drop ur a number or email I want to coconut I am willing to pay

Add new comment