This project is a Java GUI-based Email Sending Application that enables users to send emails through an SMTP server (like Gmail). The application uses Swing for the graphical interface and JavaMail API for handling email delivery securely and efficiently.
This repository is open for learning and educational purposes only.
You may:
- Read and learn from the code
- Fork the repository for personal learning
You may not:
- Re-upload the repository as your own work
- Use the content commercially without permission
- Remove original credits
- Simple and responsive GUI using Swing
- Fast email sending through SMTP
- Supports Gmail and other SMTP providers
- Modular structure divided into 4 logical parts
- Lightweight and easy to execute
The project is divided into four parts to support clarity:
| Part | Section | Description |
|---|---|---|
| 1️⃣ | Email UI | Builds the user interface using Java Swing |
| 2️⃣ | Email Data | Stores sender, recipient, subject, and message |
| 3️⃣ | Email Sender | Handles SMTP configuration and sending logic |
| 4️⃣ | Main Controller | Integrates GUI and backend logic |
- Java JDK 8 or higher
- JavaMail API (javax.mail.jar and activation.jar)
📥 Download JavaMail from: https://javaee.github.io/javamail/
- Download and add
javax.mail.jarandactivation.jarto your project folder. - Compile the file:
- Run the application:
- Enter your Gmail address, recipient address, subject, and message.
- When prompted, enter your Gmail App Password (not your regular password).
javac -cp .;javax.mail.jar;activation.jar EmailApp.javajava -cp .;javax.mail.jar;activation.jar EmailApp- Launch the application and fill in all fields.
- Click Send Email.
- If successful, you’ll see “Email Sent Successfully!”.
- If failed, you’ll see “Failed to Send Email.”
- Internet connection must be active.
- For Gmail, enable 2-Step Verification and generate an App Password.
- SMTP host/port can be changed to support Outlook, Yahoo, etc.
This project demonstrates a modular, object-oriented Java application that combines GUI development and email networking concepts. It is lightweight, efficient.