A full-stack web application that enables users to send personalized bulk emails effortlessly. Upload a CSV file containing recipient details, craft an email template with placeholders, and dispatch customized emails to each recipient via SMTP.
- CSV Upload: Import recipient data seamlessly.
- Template-Based Emails: Utilize placeholders like
{name}and{email}for personalization. - Bulk Email Dispatch: Send individualized emails to multiple recipients in one go.
- SMTP Integration: Secure and reliable email sending using SMTP protocols.
- Frontend: React with Vite
- Backend: FastAPI (Python)
- Email Engine: SMTP via
smtplib - File Handling:
csv,email,starlette,pydantic
mass-email-sender/
├── backend/
│ ├── main.py # FastAPI application entry point
│ ├── models.py # Pydantic models for request/response schemas
│ ├── utils.py # Utilities for email sending and CSV parsing
│ ├── requirements.txt # Python dependencies
│ └── .env # SMTP credentials (excluded from version control)
├── frontend/
│ ├── public/ # Static assets
│ └── src/
│ ├── App.jsx # Main React component
│ ├── components/ # Upload and Email form components
│ └── services/ # API service for backend communication
├── .gitignore
├── LICENSE
└── README.md
- Node.js (v14 or above)
- Python (v3.8 or above)
- GMail Credentials: Gmail Account
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
-
Create a
.envfile in thebackend/directory with the following content:SMTP_SERVER=smtp.example.com SMTP_PORT=587 SMTP_USERNAME=your_email@example.com SMTP_PASSWORD=your_email_password
-
-
Run the FastAPI server:
uvicorn main:app --reload
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Access the application:
- Open your browser and navigate to
http://localhost:3000
- Open your browser and navigate to
-
Upload CSV:
- Click on the "Upload CSV" button and select your CSV file containing recipient details.
-
Upload Email Template:
- Upload a .txt/.html file with your email subject and body.
- Use placeholders like
{name}and{email}to personalize the content.
-
Send Emails:
- Click on the "Send Emails" button to dispatch personalized emails to all recipients.
-
Backend:
- Utilize tools like
pytestto write and run tests for your FastAPI endpoints.
- Utilize tools like
-
Frontend:
- Employ testing libraries such as
JestandReact Testing Libraryfor component testing.
- Employ testing libraries such as
This project is licensed under the MIT License.