Work · Python · SMTP · WordPress

Automatyzacje e-mail i WordPress — the engines only

Two reusable engines: a WordPress newsletter tool and a bulk email runner. This page describes the machinery — not campaigns, recipients, or clients.

My role Builder of both engines: WordPress REST media flow, SMTP throttle/resume, job CLI, Excel grouping, and encrypted credential storage.

Stack Python · requests · WordPress REST API · SMTP · openpyxl · cryptography

Status Reusable engines

Context
Newsletter and bulk-mail work needed reliable engines: upload images the WordPress way, rewrite links, send with throttle and resume, and run named jobs safely before a real send. Constraint: describe engines only — no campaign content, recipient lists, client names, or volumes.
Intervention

Built two Python engines with explicit safety rails (throttle, resume, dry-run, encrypted secrets).

Phase 1 — WordPress newsletter tool

Uploads images via the WordPress REST API, rewrites links in the email body, sends via SMTP with throttling, keeps logs, and can resume from where a run stopped.

Phase 2 — Bulk email engine

Per-campaign job config run with --job <name>. Dry-run and test send before a real send. Recipient grouping from Excel (openpyxl). Credentials stored encrypted (cryptography).

Risks & how they were handled
  • Accidental mass send → dry-run and test send gates before real SMTP.
  • Partial runs / SMTP limits → throttling plus resume-from-checkpoint logs.
  • Secret leakage → credentials encrypted at rest with cryptography.
What I'd do differently
  • Make resume tokens first-class in the job schema from the first version.
  • Add a structured send ledger format shared by both engines.
Outcome
Before: ad-hoc scripts without shared resume, throttle, or dry-run discipline. After: two engines — WordPress REST media upload + link rewrite + throttled SMTP with resume; and a --job bulk mailer with dry-run/test send, Excel grouping, and encrypted stored credentials.

System map

Campaign: template + recipient list

--job <name>

WordPress media upload

REST · requests

Link rewrite and mail send

SMTP · throttle · resume

Engines

Dry-run before real send

safety gate

Recipients from Excel

openpyxl

What it does

Uploads images and rewrites links before send

Throttles SMTP and resumes a stopped run

Refuses a real send until dry-run / test pass

Two engines with explicit safety rails — dry-run first, then throttled SMTP with resume.

What shipped

  • WordPress newsletter engine Uploads images, rewrites links, then sends with throttled SMTP, logs, and resume from a stopped run.
  • Bulk email engine Named campaigns with dry-run and test send before real SMTP, plus Excel recipient grouping.
  • Encrypted credentials Stored secrets protected with cryptography — not plain-text config.

Stack Python requests WordPress REST SMTP openpyxl cryptography

Reusable engines

← Znam swoje auto Next: FinOps →