Chapters8
Published8
Edition2026
Languageen-GB

The chapters.

In chronological order
Chapter 01
Why self-host a newsletter (and the rules you inherit)
Self-host a newsletter on cPanel with PHP and MySQL: the parts list, the UK GDPR and PECR rules you inherit, and what production-ready actually costs.
9 min read·beginner
Published
Chapter 02
Double opt-in in PHP with a secure confirmation token
Build a GDPR-correct double opt-in newsletter in PHP: a 32-byte CSPRNG confirm token, a sha256 hash at rest, and consent timestamped on confirm.
13 min read·intermediate
Published
Chapter 03
What to store: hashed IP, consent records, and why
Is an IP address personal data under UK GDPR? Yes. The salted SHA-256 hash, the consent record, and the events table from a real PHP newsletter.
11 min read·intermediate
Published
Chapter 04
SPF, DKIM, DMARC on cPanel, including Cloudflare in front
Configure SPF, DKIM and DMARC for a cPanel newsletter, and fix the duplicate v=spf1 permerror when Cloudflare or another external DNS is authoritative.
12 min read·intermediate
Published
Chapter 05
Multipart MIME email in PHP with a real text fallback
Hand-build multipart/related wrapping multipart/alternative in PHP: text and HTML parts, an inline CID logo, and boundary rules that work.
13 min read·advanced
Published
Chapter 06
Rate limiting and abuse prevention on a public endpoint
Per-IP rate limiting for a public PHP subscribe endpoint: a file-backed sliding window, standard 429 headers, honeypot and time-trap. Real production PHP.
10 min read·intermediate
Published
Chapter 07
Unsubscribe and right-to-erasure with an audit trail
How a PHP newsletter honours unsubscribe and right to erasure: soft-delete in the database, a 30-day retention cron, and an audit trail that survives.
11 min read·intermediate
Published
Chapter 08
UK GDPR and PECR for newsletter operators, in code
PECR decides whether you may send. UK GDPR decides how you may hold. ICO rules mapped to real consent-logging code in a production cPanel newsletter.
12 min read·intermediate
Published