Skip to content

prakc7/Java-Mail-Sender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📧 Email Sending Application (Java GUI + SMTP)

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

🧩 Features

  • 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

🧱 Project Structure

The project is divided into four parts to support clarity:

PartSectionDescription
1️⃣Email UIBuilds the user interface using Java Swing
2️⃣Email DataStores sender, recipient, subject, and message
3️⃣Email SenderHandles SMTP configuration and sending logic
4️⃣Main ControllerIntegrates GUI and backend logic

⚙ Requirements

  • Java JDK 8 or higher
  • JavaMail API (javax.mail.jar and activation.jar)

📥 Download JavaMail from: https://javaee.github.io/javamail/

🚀 How to Run

  1. Download and add javax.mail.jar and activation.jar to your project folder.
  2. Compile the file:
  3. javac -cp .;javax.mail.jar;activation.jar EmailApp.java
  4. Run the application:
  5. java -cp .;javax.mail.jar;activation.jar EmailApp
  6. Enter your Gmail address, recipient address, subject, and message.
  7. When prompted, enter your Gmail App Password (not your regular password).

📬 Sending an Email

  • 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.”

🧠 Notes

  • 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.

🏁 Summary

This project demonstrates a modular, object-oriented Java application that combines GUI development and email networking concepts. It is lightweight, efficient.

About

College: Java Project at NIET, Greater Noida

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages