Skip to content

AI-powered app to generate and send professional emails using Flask, SMTP, and the GROQ API.

License

Notifications You must be signed in to change notification settings

xHarshit/AI-Email-Sender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✉️ AI Email Sender

A complete web application that uses AI to generate and send professional emails effortlessly.


📌 Overview

This application allows users to generate and send professional emails using AI. Users provide a recipient email address, subject, and a prompt describing the content of the email. The system generates a draft using the GROQ API, which users can edit before sending via SMTP.


🌐 Live App

🔗 https://ai-email-sender-k619.onrender.com

⚠️ Note: The Render free tier may take a few seconds to start after inactivity.


🖼️ Screenshots

  1. User Interface Overview
    UI Overview

  2. Generated Email with Prompt
    Generated Email

  3. Email Received in Mailbox
    Inbox View


🚀 Features

  • ✅ Enter recipient email, subject, and a prompt for the email body
  • ✨ AI-generated email content based on the prompt
  • 📝 Editable email draft before sending
  • 📤 Email sending functionality using SMTP
  • 📱 Responsive, modern UI
  • 🔐 Secure environment variable management

🖥️ Run Locally

1. Clone the repository

git clone https://github.com/your-username/AI-Email-Sender.git
cd AI-Email-Sender

2. Install dependencies

pip install -r requirements.txt

3. Setup environment variables

Create a .env file in the root directory and add:

EMAIL_ADDRESS=your_email@example.com
EMAIL_PASSWORD=your_email_password_or_app_password
GROQ_API_KEY=your_groq_api_key

🔐 If your email provider requires two-factor authentication, use an app-specific password.


4. Run the application

python app.py

Visit the app at:
🌐 http://localhost:5000


☁️ Deployment (on Render)

The app is deployed using Render.

🛠️ Environment Variables (configure in Render dashboard)

  • EMAIL_ADDRESS
  • EMAIL_PASSWORD
  • GROQ_API_KEY

⚙️ Render Configuration

  • Start command:

    python app.py
  • Build command:

    pip install -r requirements.txt

📂 Project Structure

AI-Email-Sender/
├── app.py                  # Flask backend logic
├── templates/
│   └── index.html          # Frontend HTML
├── static/
│   └── script.js           # Frontend JavaScript logic
├── screenshots/
│   ├── 1.png               # Full UI screenshot
│   ├── 2.png               # AI-generated email with prompt
│   └── 3.png               # Received email in inbox
├── requirements.txt        # Python dependencies
└── .env (not committed)    # Environment variables

📧 Powered By

  • Flask
  • GROQ API
  • SMTP for sending emails
  • HTML, CSS, JavaScript (Vanilla) for the frontend

🛡️ License

This project is licensed under the MIT License.

About

AI-powered app to generate and send professional emails using Flask, SMTP, and the GROQ API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published