<h1 align="center">📧 PHP SMTP Contact Form (Without Composer)</h1>

<p align="center">
  <img src="https://img.shields.io/badge/PHP-8.x-blue" />
  <img src="https://img.shields.io/badge/SMTP-Enabled-success" />
  <img src="https://img.shields.io/badge/PHPMailer-Manual-orange" />
  <img src="https://img.shields.io/badge/License-Free-green" />
  <img src="https://img.shields.io/badge/Status-Production--Ready-brightgreen" />
</p>

<p align="center">
A <b>simple, secure, and production-ready PHP contact form</b> that sends emails using <b>SMTP</b> without Composer.<br>
Built with <b>manual PHPMailer integration</b>, input validation, and CAPTCHA protection.
</p>

<hr>

## 🚀 Features

<table>
<tr><td>📧 SMTP Email</td><td>No <code>mail()</code> function used</td></tr>
<tr><td>📦 No Composer</td><td>Manual PHPMailer integration</td></tr>
<tr><td>🔐 Secure POST</td><td>Data not exposed in URL</td></tr>
<tr><td>🧠 CAPTCHA</td><td>Spam & bot protection</td></tr>
<tr><td>🧼 Validation</td><td>Input sanitization included</td></tr>
<tr><td>🌍 Hosting Ready</td><td>Works on localhost & live server</td></tr>
</table>

<hr>

## 🛠️ Technologies Used

<table>
<tr><th>Technology</th><th>Purpose</th></tr>
<tr><td>PHP</td><td>Backend logic</td></tr>
<tr><td>PHPMailer</td><td>SMTP email handling</td></tr>
<tr><td>HTML / CSS</td><td>Form UI</td></tr>
<tr><td>SMTP</td><td>Email delivery (Gmail / Zoho / Outlook)</td></tr>
</table>

<hr>

## 📂 Folder Structure

<pre>
/project-root
├─ index.php
├─ process_contact.php
├─ /phpmailer
│  ├─ PHPMailer.php
│  ├─ SMTP.php
│  └─ Exception.php
├─ /config
│  └─ mail.example.php
└─ README.md
</pre>

<hr>

## ⚙️ SMTP Configuration

Update credentials in <code>process_contact.php</code>:

<table>
<tr><td>SMTP Host</td><td>smtp.gmail.com</td></tr>
<tr><td>Email Username</td><td>your-email@gmail.com</td></tr>
<tr><td>App Password</td><td>Generated password</td></tr>
<tr><td>Port</td><td>587 (TLS) / 465 (SSL)</td></tr>
</table>

<blockquote>
⚠️ Do NOT use your normal email password. Always use an <b>App Password</b>.
</blockquote>

<hr>

## 🔐 Security

<ul>
<li>POST method used</li>
<li>CAPTCHA verification enabled</li>
<li>Input sanitization</li>
<li>SMTP authentication (TLS / SSL)</li>
<li>No credentials exposed in URL</li>
</ul>

<hr>

## ✅ Production Ready

<p>This project is suitable for:</p>

<ul>
<li>Business websites</li>
<li>Contact & inquiry pages</li>
<li>Lead generation forms</li>
<li>Client support systems</li>
</ul>

<hr>

## 📚 Libraries & References

<ul>
<li><b>PHPMailer (Official GitHub):</b><br>https://github.com/PHPMailer/PHPMailer</li>
<li><b>PHPMailer Documentation:</b><br>https://github.com/PHPMailer/PHPMailer/wiki</li>
<li><b>Gmail App Password Guide:</b><br>https://support.google.com/accounts/answer/185833</li>
</ul>

<hr>

## 📌 Notes

<ul>
<li>Enable <b>2-Step Verification</b> for Gmail</li>
<li>Use <b>App Password</b></li>
<li>Never push real credentials to GitHub</li>
<li>Use <code>.gitignore</code> for sensitive files</li>
</ul>

<hr>

## 📄 License

<p>Free to use for learning, testing, and production projects.</p>

<p align="center"><b>⭐ Star this repository if it helped you!</b></p>
<p align="center"><b>Following on IG - heyyy_kishor..</b></p>
