A Spring Boot microservices-based AI email automation system using Eureka for service discovery, centralized Config Server, OTP authentication, Gemini-powered email generation, and SMTP-based email delivery.
The AI Email Automation Platform is a secure, scalable, and cloud-ready microservices-based application built using Spring Boot and Spring Cloud. The platform automates professional email generation and delivery using AI-powered content generation while ensuring strong security through OTP-based authentication.
This system enables users to log in securely using a one-time password (OTP). Once authenticated, users can provide natural language prompts to generate professional emails powered by the Gemini API. Generated emails can be copied or sent directly to recipients through the platform, with the logged-in user automatically added to CC.
The application follows a microservices architecture, where each service is independently deployable, containerized using Docker, and orchestrated using Docker Compose.
All services are registered with Eureka Service Discovery, enabling dynamic service-to-service communication without hard-coded URLs.
- User Service – Handles user authentication and OTP verification
- AI Service – Generates email content using the Gemini API
- Email Service – Sends emails via SMTP and manages CC functionality
- Config Server – Centralized external configuration management
- Eureka Server – Service registration and discovery
- User initiates login
- OTP is generated and sent to the user's email
- User verifies OTP
- Access is granted upon successful verification
This approach eliminates password management and enhances security.
The AI Service integrates with the Gemini API to generate context-aware, professional emails.
Users can provide prompts describing tone, purpose, or content requirements, and the AI generates a structured email draft accordingly.
Using the Email Service, users can:
- Copy the generated email content
- Send emails directly from the platform
- Automatically include themselves in CC for transparency and record-keeping
The Spring Cloud Config Server manages:
- API keys (Gemini, SMTP)
- Database configurations
- Environment-specific properties
Configurations are externalized and can be updated without rebuilding services.
All microservices are fully Dockerized and managed using Docker Compose, enabling:
- Easy local setup
- Consistent environments
- One-command startup for all services
Each service runs in its own container and communicates via Eureka.
- OTP-based secure authentication
- AI-powered email generation
- Automated email sending with CC support
- Microservices architecture with Eureka
- Centralized configuration using Config Server
- Fully Dockerized and Docker Compose–orchestrated
- Cloud-native and scalable design
- Backend: Spring Boot, Spring Cloud
- Service Discovery: Eureka
- Configuration: Spring Cloud Config Server
- AI Integration: Gemini API
- Email: SMTP
- Containerization: Docker, Docker Compose
- Database: MongoDB / PostgreSQL (as applicable)
- JWT-based authorization
- API Gateway integration
- Rate limiting and monitoring
- Kubernetes deployment
- Email templates and scheduling
Developed by Divyansh Upadhyay