new-site/scripts/formation
justin b375385efd fix(email): add text/plain part to every transactional + telecom email
All transactional/worker senders built multipart/alternative (or mixed)
messages with ONLY an HTML part. A single-part multipart/alternative is
malformed and HTML-only mail is a spam-score signal -- the same class of
deliverability bug that hurt the campaign pipeline, but on the telecom /
filing / customer-transactional path (499-Q reminders, RMD/FCC filing
review links, intake/completion/delivery emails, commissions, etc).

- worker_email.send_worker_email: auto-derive plaintext from HTML when
  caller omits text= (fixes the shared helper for all current+future use)
- 16 rolled-their-own senders in scripts/workers/** + scripts/formation/
  document_delivery.py: attach html_to_text(...) plaintext sibling before
  the HTML part (job_server + document_delivery wrap text+html in an
  alternative sub-part so PDFs still attach to the mixed root)
- api/src/email.ts: add dependency-free htmlToText() and default
  sendEmail text to it (fixes checkout/webhook HTML-only sends)

Verified: all py files compile + import at runtime, api tsc passes,
htmlToText handles hrefs/lists/entities, 11 plaintext unit tests pass.
Telecom campaign 407 (Jun 8) was HTML-only + sent in the DKIM-broken
window -> 384 sent / 0 clicks (same junked-mail signature).
2026-06-17 21:07:40 -05:00
..
jurisdictions Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
states fix(formation/NV): name search returns unknown (admin-verify), not a fake result 2026-06-09 08:41:22 -05:00
__init__.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
base.py fix(formation): name-search returns null (not false) on adapter error 2026-06-09 08:06:43 -05:00
bulk_download.py fix Iowa: remove wrong Socrata dataset (was liquor stores), mark SOS as WAF-blocked 2026-05-30 19:28:41 -05:00
document_delivery.py fix(email): add text/plain part to every transactional + telecom email 2026-06-17 21:07:40 -05:00
ein_worker.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
formation_worker.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
holidays.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
name_search.py fix(formation): name-search returns null (not false) on adapter error 2026-06-09 08:06:43 -05:00
operating_agreement.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
portal_schedule.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
test_name_search.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00