Skip to content

arjun16-t/coldmailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ ColdMailer

ColdMailer is a production-oriented cold email automation system built with Django, Celery, Redis, and PostgreSQL.

The project focuses on scalable backend architecture, asynchronous processing, distributed services, and real-world deployment practices rather than just local development.


✨ Features

  • πŸ“„ Upload resumes for personalized cold email generation
  • ⚑ Asynchronous email processing using Celery workers
  • πŸ” Automatic retry system for failed emails
  • 🧹 Scheduled background jobs using Celery Beat
  • πŸ—‚οΈ Temporary centralized file storage
  • 🧠 Designed for multi-service deployment environments
  • πŸ“Š Email logging and status tracking
  • ☁️ Cloud deployment ready

πŸ—οΈ Architecture

flowchart LR
    U[User / Browser]
    W[Django Web App]
    DB[(PostgreSQL)]
    R[(Redis Broker)]
    CW[Celery Worker]
    CB[Celery Beat]
    FS[(Central File Storage)]
    SMTP[SMTP Provider]

    U -->|Upload resume & inputs| W

    W -->|Store resume temporarily| FS
    W -->|Enqueue async task| R
    W -->|Create email logs| DB

    R -->|Dispatch task| CW
    CW -->|Read resume| FS
    CW -->|Send email| SMTP
    CW -->|Update logs/status| DB

    CB -->|Schedule retries & cleanup| R
Loading

πŸ› οΈ Tech Stack

Category Technology
Backend Django
Language Python
Database PostgreSQL
Queue/Broker Redis
Async Workers Celery
Scheduler Celery Beat
Deployment Railway
Static Files WhiteNoise

πŸ“‚ Project Structure

coldmailer/
β”‚
β”œβ”€β”€ coldmailer/          # Django project settings
β”œβ”€β”€ mailer/              # Main application logic
β”œβ”€β”€ templates/           # HTML templates
β”œβ”€β”€ static/              # CSS and JS
β”œβ”€β”€ attachments/         # Local development uploads
β”œβ”€β”€ manage.py
└── requirements.txt

βš™οΈ Environment Variables

Create a .env file in the root directory.

SECRET_KEY=your_secret_key

DEBUG=True

DATABASE_URL=postgresql://username:password@localhost:5432/coldmailer

REDIS_URL=redis://127.0.0.1:6379/0

SMTP_ENCRYPTION_KEY=your_encryption_key

πŸš€ Local Setup

1. Clone Repository

git clone https://github.com/your-username/coldmailer.git
cd coldmailer

2. Create Virtual Environment

Linux / macOS

python3 -m venv .venv
source .venv/bin/activate

Windows

python -m venv .venv
.venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

🧰 Install & Start Redis

Ubuntu

sudo apt update
sudo apt install redis-server

Start Redis:

sudo systemctl start redis-server

Verify Redis:

redis-cli ping

Expected output:

PONG

πŸ—„οΈ Setup PostgreSQL

Install PostgreSQL and create a database.

Example:

CREATE DATABASE coldmailer;

Update your DATABASE_URL accordingly.


🧱 Run Database Migrations

python manage.py migrate

πŸ“¦ Collect Static Files

python manage.py collectstatic --noinput

▢️ Running the Project

Start Django Server

python manage.py runserver

Start Celery Worker

celery -A coldmailer worker --loglevel=info

Start Celery Beat

celery -A coldmailer beat --loglevel=info

🌐 Production Deployment (Railway)

The project is designed to run as multiple services:

  • Django Web Service
  • Celery Worker
  • Celery Beat Scheduler
  • Redis
  • PostgreSQL

πŸš€ Railway Start Command

python manage.py migrate && python manage.py collectstatic --noinput && gunicorn coldmailer.wsgi:application --bind 0.0.0.0:$PORT

πŸ“Œ Important Production Notes

  • Do not use SQLite in production
  • Redis is required for Celery
  • PostgreSQL is required for persistent data
  • Temporary files should use centralized/shared storage
  • Services are stateless and distributed

πŸ“ˆ Future Improvements

  • πŸ€– AI-generated personalized emails
  • πŸ“Š Analytics dashboard
  • πŸ“„ Resume parser
  • 🎯 ATS optimization
  • πŸ“¬ Campaign tracking
  • πŸ“‘ Email templates
  • 🌐 Web Scraper for E-Mails
  • πŸ“ˆ Lead Generation

🧠 What This Project Demonstrates

This project focuses on:

  • Distributed backend systems
  • Production deployment
  • Asynchronous task queues
  • Service-oriented architecture
  • Fault tolerance
  • Scalability considerations

πŸ‘¨β€πŸ’» Author

Arjun Tomar


⭐ Final Note

ColdMailer was built as a backend engineering project to explore how production systems behave beyond local development.

The focus was not only on features, but also on reliability, architecture, deployment, and scalability.

About

ColdMailer is a production-oriented cold email automation system built with Django, Celery, Redis, and PostgreSQL. It focuses on scalable backend architecture, asynchronous task processing, distributed services, and real-world deployment practices for personalized cold outreach workflows.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors