Skip to content

Sumit-0011/AI-Email-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AI Email Generator

An AI-powered Email Generator built using Spring Boot and Google's Gemini API. This application generates professional, context-aware emails based on user input, helping users quickly draft emails for various purposes such as business communication, job applications, customer support, and more.

Features

  • Generate professional emails using AI
  • Powered by Google Gemini API
  • RESTful API architecture
  • Clean Spring Boot backend implementation
  • JSON-based request and response handling
  • Easy integration with frontend applications
  • Configurable email tone and content generation

Tech Stack

Backend

  • Java
  • Spring Boot
  • Maven
  • Spring Web

AI Integration

  • Google Gemini API

Tools

  • Git
  • GitHub
  • Postman

Project Structure

src/
├── main/
│   ├── java/
│   │   └── com/example/demo/
│   │       ├── controller/
│   │       ├── service/
│   │       ├── dto/
│   │       └── config/
│   └── resources/
│       └── application.properties
└── test/

API Endpoint

Generate Email

POST /api/email/generate

Request Body

{
  "prompt": "Write a professional leave request email for two days."
}

Response

{
  "emailContent": "Dear Manager,\n\nI would like to request..."
}

Getting Started

Prerequisites

  • Java 17+
  • Maven
  • Gemini API Key

Clone the Repository

git clone git@github.com:Sumit-0011/AI-Email-Generator.git
cd AI-Email-Generator

Configure API Key

Add your Gemini API key in:

application.properties

Example:

gemini.api.key=YOUR_API_KEY

Run the Application

mvn spring-boot:run

Or

mvn clean install
java -jar target/*.jar

Testing

Use Postman or any API client to send requests to the API endpoint.

Example:

POST http://localhost:8080/api/email/generate

Future Improvements

  • Email tone selection (Formal, Friendly, Professional)
  • Multiple language support
  • Email templates
  • Frontend UI with React or Angular
  • Email sending integration
  • User authentication

Learning Outcomes

This project helped me gain hands-on experience with:

  • Spring Boot REST APIs
  • External API integration
  • JSON request/response handling
  • Maven project management
  • Git and GitHub workflows
  • Generative AI application development

Author

Sumit

GitHub: https://github.com/Sumit-0011


License

This project is open source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors