Skip to content

πŸš€ A simple and secure email-sending system using PHP, PHPMailer, and SMTP. Features a responsive Bootstrap UI with AJAX-based form submission and SweetAlert2 notifications.

Notifications You must be signed in to change notification settings

Iqbolshoh/php-send-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“§ PHP Mailer - Email Sending System

This project allows users to send emails via SMTP server using PHP and the PHPMailer library. It features a clean Bootstrap UI and uses SweetAlert2 for better user experience.

Banner

πŸ“Œ Features

βœ” Send emails via SMTP πŸ“§
βœ” CSRF protection for security πŸ”
βœ” SweetAlert2 for user notifications πŸ’‘
βœ” Responsive UI with Bootstrap 🎨
βœ” AJAX support for seamless requests ⚑

🎯 Workflow Overview

1️⃣ User fills out the email form and submits.
2️⃣ JavaScript fetch API sends data to send-mail.php.
3️⃣ PHP backend validates data, checks CSRF token, and sends an email using PHPMailer.
4️⃣ SweetAlert2 displays a success/failure notification.

πŸ“‚ Project Structure

/project-root
│── /src/images/logo.svg      # Project logo
│── /vendor                   # Composer dependencies
│── index.php                 # Frontend
│── send-mail.php             # Backend logic for sending emails
│── composer.json             # Composer configuration
│── README.md                 # Documentation

πŸš€ Setup & Installation

1️⃣ Clone the repository:

git clone https://github.com/Iqbolshoh/php-send-mail.git

2️⃣ Navigate to the project directory:

cd php-mailer

3️⃣ Install dependencies via Composer:

composer install

4️⃣ Configure your SMTP settings in send-mail.php:

// SMTP Server Configuration
define('SMTP_HOST', 'mail.yourdomain.com');
define('SMTP_USER', 'your-email@yourdomain.com');
define('SMTP_PASS', 'your-email-password');
define('SMTP_PORT', 465); // 465 for SSL, 587 for TLS

5️⃣ Run the project on a local server:

php -S localhost:8000

6️⃣ Open your browser and go to:

http://localhost:8000/

πŸ–₯ Technologies Used

HTML Bootstrap JavaScript PHP PHPMailer

🀝 Contributing

🎯 Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.

πŸ“¬ Connect with Me

πŸ’¬ I love meeting new people and discussing tech, business, and creative ideas. Let’s connect! You can reach me on these platforms:

About

πŸš€ A simple and secure email-sending system using PHP, PHPMailer, and SMTP. Features a responsive Bootstrap UI with AJAX-based form submission and SweetAlert2 notifications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages