/mailman

Personalized, LLM-based email marketing automation with user segmentation and A/B testing analytics

Primary LanguagePythonApache License 2.0Apache-2.0

Mailman is a personalized email marketing automation system with user segmentation, NLP-driven email content generation and A/B testing analytics.

This project was developed as part of a freelance project that was published with the client's permission without real data. It's just a minimal PoC pipeline.

Features

  • User segmentation
    Utilizes K-means, DBSCAN and ensemble approaches to group users based on purchase behavior, demographics and engagement level.
  • Email content generation
    Integrates NLP techniques and LMs via HF transformers to generate personalized email subject lines and body content.
  • A/B testing & analytics
    Implements statistical testing (t-test, ANOVA) and visualization to compare email variant performance, tracking open rates, click-through rates and conversions.
  • Email sending module
    Supports automated email dispatching using SMTP with a simulation mode for testing.

Installation & running

  1. Clone:

    git clone git@github.com:avrtt/mailman.git
    cd mailman
  2. Create a virtual environment and install dependencies:

    python3 -m venv venv
    source venv/bin/activate # Windows: venv\Scripts\activate
    pip install -r requirements.txt
  3. Run the main script to execute the entire pipeline:

    python src/main.py

Configuration

Adjust parameters such as email server settings, model parameters and clustering options in src/config.py.

License

Apache 2.0.