fix: Date/Message-ID/From-name on ticket emails, richer body (v1.6.1-aio.9) #42

Merged
padreug merged 1 commit from fix/ticket-email-headers into main 2026-09-08 14:24:04 +00:00
Owner

Why

A tester's ticket email landed in spam. I bought a demo ticket addressed to a mail-tester inbox (ticket HcKjnsk6kcqH2i4JVUQcbt): 8.3/10, SPF / DKIM / DMARC all pass through the mail.ariege.io → mx.ariege.io relay, so the server setup and the test@ local part are not the cause. Every deduction was in the message itself:

rule penalty
MISSING_DATE 1.4
HTML_IMAGE_ONLY_04 (a QR with almost no words) 0.3
MISSING_MID 0.1

Gmail/Outlook weigh a missing Date:/Message-ID: as machine-generated mail far more than SpamAssassin does.

What

  • build_ticket_email (extracted, unit-tested) sets Date, a Message-ID under the sender domain, and a From display name from lnbits_site_title.
  • Body gains event name, dates, location, name on ticket, ticket id and the door instruction (text + HTML), so the HTML part is no longer image-only.
  • config.json → 1.6.1-aio.9; docs/upstream-candidates.md row (lnbits core send_email has the same omissions → aiolabs/lnbits#71).

36 tests pass; black / ruff / prettier clean.

Deploy

Merge → tag v1.6.1-aio.9 → catalog entry → upgrade on demo → re-run mail-tester (expect ≥ 9.8).

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYwoAkZZmXMMmaBp4WGUBo

## Why A tester's ticket email landed in spam. I bought a demo ticket addressed to a mail-tester inbox (ticket `HcKjnsk6kcqH2i4JVUQcbt`): **8.3/10**, SPF / DKIM / DMARC all **pass** through the `mail.ariege.io → mx.ariege.io` relay, so the server setup and the `test@` local part are not the cause. Every deduction was in the message itself: | rule | penalty | |---|---| | `MISSING_DATE` | 1.4 | | `HTML_IMAGE_ONLY_04` (a QR with almost no words) | 0.3 | | `MISSING_MID` | 0.1 | Gmail/Outlook weigh a missing `Date:`/`Message-ID:` as machine-generated mail far more than SpamAssassin does. ## What - `build_ticket_email` (extracted, unit-tested) sets `Date`, a `Message-ID` under the sender domain, and a `From` display name from `lnbits_site_title`. - Body gains event name, dates, location, name on ticket, ticket id and the door instruction (text + HTML), so the HTML part is no longer image-only. - `config.json` → `1.6.1-aio.9`; `docs/upstream-candidates.md` row (lnbits core `send_email` has the same omissions → aiolabs/lnbits#71). 36 tests pass; black / ruff / prettier clean. ## Deploy Merge → tag `v1.6.1-aio.9` → catalog entry → upgrade on demo → re-run mail-tester (expect ≥ 9.8). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYwoAkZZmXMMmaBp4WGUBo
fix: Date/Message-ID/From-name on ticket emails, richer body (1.6.1-aio.9)
Some checks failed
lint.yml / fix: Date/Message-ID/From-name on ticket emails, richer body (1.6.1-aio.9) (pull_request) Failing after 0s
lint.yml / fix: Date/Message-ID/From-name on ticket emails, richer body (1.6.1-aio.9) (push) Failing after 0s
3a8e0ff591
A tester's ticket email landed in spam. A mail-tester run against demo
scored 8.3/10 with SPF, DKIM and DMARC all passing through the VPS relay,
so the deductions were all in the message: MISSING_DATE (1.4),
HTML_IMAGE_ONLY_04 (0.3), MISSING_MID (0.1) — and Gmail/Outlook weigh a
missing Date/Message-ID as "machine-generated" far more than that.

- `build_ticket_email` sets Date, a Message-ID under the sender domain,
  and a From display name from `lnbits_site_title`.
- The body now carries the event name, dates, location, name on ticket,
  ticket id and the door instruction, so the HTML part is no longer a
  QR with a handful of words.

Upstream candidate: lnbits core `send_email` has the same omissions.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYwoAkZZmXMMmaBp4WGUBo
padreug deleted branch fix/ticket-email-headers 2026-09-08 14:24:05 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/events!42
No description provided.