logo
0
0
WeChat Login

Personalized Batch Email Engine

English | 简体中文

Chinese name: 个性化批量邮件引擎

Personalized Batch Email Engine is a lightweight Codex/OpenClaw skill for sending authorized one-to-one style email batches over SMTP.

It is built for teams that need a simple, scriptable workflow for:

  • customer lifecycle email
  • partner and supplier contact email
  • internal notifications
  • support follow-up
  • subscribed newsletter sends
  • local SMTP testing with Mailpit or Mailtrap

It is not built for scraped leads, unsolicited cold outreach, or bulk prospecting.

Why this exists

Most email automation tools are built around campaign UIs and hidden state. This project keeps the workflow file-based and transparent:

  • input is CSV or JSONL
  • authorization is explicit in the data
  • dry-run comes first
  • SMTP login can be tested independently
  • output is plain send_log.csv and summary.json

That makes it easier to audit, version, and integrate into existing AI or ops workflows.

Core Features

  • Authorized SMTP batch sending with CSV or JSONL input
  • Explicit authorization checks through consent_status or audience_type
  • Local SMTP test mode for Mailpit and Mailtrap
  • Dry-run mode before live send
  • Configurable pacing with --min-gap-seconds and --max-gap-seconds
  • .env style SMTP secret loading through --smtp-env-file
  • Partner-contact batch conversion for existing business relationship lists
  • OpenClaw approved_to_send.csv conversion into an authorized batch
  • Standalone SMTP login probe for quick credential diagnostics

Repository Layout

personalized-batch-email-engine/ ├── README.md ├── SKILL.md ├── assets/ │ └── sample-authorized-email-batch.csv └── scripts/ ├── send_authorized_batch.py ├── mark_partner_contacts.py ├── convert_openclaw_approved_to_authorized.py └── smtp_login_probe.py

Input Format

Required fields:

  • email
  • subject
  • body

At least one authorization field is required for live sends:

  • consent_status
  • audience_type

Accepted authorization values:

  • opt_in
  • subscribed
  • customer
  • partner
  • partner_contact
  • transactional
  • support
  • internal

Recommended metadata:

  • authorization_basis
  • authorization_note
  • relationship_owner
  • from_email
  • reply_to
  • list_unsubscribe

Quick Start

Dry-run:

python3 scripts/send_authorized_batch.py \ --input assets/sample-authorized-email-batch.csv \ --output-dir /tmp/authorized-email-dryrun \ --dry-run

SMTP login test:

python3 scripts/smtp_login_probe.py \ --smtp-env-file /path/to/.smtp_env \ --smtp-host smtp.example.com \ --smtp-port 465 \ --smtp-security ssl \ --smtp-username ops@example.com \ --smtp-password-env SMTP_PASSWORD

Authorized live send:

python3 scripts/send_authorized_batch.py \ --input /path/to/authorized.csv \ --output-dir /tmp/authorized-live \ --smtp-env-file /path/to/.smtp_env \ --smtp-host smtp.example.com \ --smtp-port 465 \ --smtp-security ssl \ --smtp-username ops@example.com \ --smtp-password-env SMTP_PASSWORD \ --from-email ops@example.com \ --reply-to ops@example.com \ --min-gap-seconds 2 \ --max-gap-seconds 3

SMTP Secret File

Both formats are supported:

SMTP_PASSWORD=your-secret

or:

export SMTP_PASSWORD=your-secret

Helper Scripts

mark_partner_contacts.py

Adds authorization fields for lists that already come from a real partner or supplier relationship.

convert_openclaw_approved_to_authorized.py

Converts an OpenClaw approved_to_send.csv file into a structured authorized.csv that this skill can send.

smtp_login_probe.py

Validates SMTP credentials without sending mail.

Output

Every run writes:

  • send_log.csv
  • summary.json

These files are designed to be easy to inspect, automate around, and commit to an ops repository if needed.

Suggested GitHub Description

A lightweight SMTP email automation skill for authorized one-to-one batch delivery, partner-contact batches, dry-runs, and local Mailpit testing.

Suggested Topics

smtp, email-automation, python, codex-skill, mailpit, mailtrap, transactional-email, ops-tooling

Non-Goals

  • lead scraping
  • cold email blasting
  • growth spam
  • hidden campaign state

License

Add the license that matches your release plan before publishing.

About

体中文中文名:个性化批量邮件引擎英文名:Personalized Batch Email EnginePersonalized Batch Email Engine 是一个面向已授权收件人的轻量级 SMTP 发信技能包

68.00 KiB
Skills0 forks0 stars1 branches0 TagREADMEOther license
Language
Python100%