Skip to content

A simple Spring Boot application to send emails using Gmail SMTP. This project demonstrates how to send emails to one or multiple recipients using Spring Boot Mail Starter.

Notifications You must be signed in to change notification settings

srinivas6303/Spring-Boot-Email-Sender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📧 Spring Boot Email Sender

A simple Spring Boot application to send emails using Gmail SMTP.
This project demonstrates how to send emails to one or multiple recipients using Spring Boot Mail Starter.


🚀 Features

  • Send email using REST API
  • Supports single or multiple recipients
  • Uses Gmail SMTP with App Password
  • Input validation
  • Exception handling
  • Simple and clean architecture

🛠️ Tech Stack

  • Java
  • Spring Boot
  • Spring Boot Starter Mail
  • REST API
  • Maven

⚙️ Configuration

1️⃣ Gmail App Password Setup

To send emails using Gmail, you must generate an App Password.

Steps:

  1. Enable 2-Step Verification in your Google Account
  2. Go to 👉 https://myaccount.google.com/apppasswords
  3. Select:
    • App: Mail
    • Device: Other (SpringBoot)
  4. Generate and copy the 16-character App Password

2️⃣ application.properties

spring.mail.host=smtp.gmail.com
spring.mail.port=587

spring.mail.username=yourgmail@gmail.com
spring.mail.password=YOUR_APP_PASSWORD

spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true

Thank you

About

A simple Spring Boot application to send emails using Gmail SMTP. This project demonstrates how to send emails to one or multiple recipients using Spring Boot Mail Starter.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages