new-site/scripts/workers/services
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
..
telecom fix(email): add text/plain part to every transactional + telecom email 2026-06-17 21:07:40 -05:00
__init__.py mcs150: enrich intake from FMCSA carrier census before PDF fill 2026-06-10 12:35:52 -05:00
base_handler.py fix(email): add text/plain part to every transactional + telecom email 2026-06-17 21:07:40 -05:00
bdc_filing.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
boc3_filing.py fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment 2026-06-09 14:40:46 -05:00
boc3_playwright.py BOC-3: use relay_integration.load_card_from_erpnext() for proper card matching 2026-05-30 22:46:52 -05:00
breach_response.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
calea_ssi.py Fix MinioStorage.upload_file → .upload + suppress instant delivery during eSign pause 2026-05-04 10:59:45 -05:00
campaign_review.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
canada_crtc.py crtc: remove Canadian accountant/accounting-setup service (no longer offered) 2026-06-10 16:51:33 -05:00
carrier_closeout.py Wire fulfillment alerts to Telegram + surface order progress in portal + even out ERPNext sync 2026-06-07 03:17:46 -05:00
ccpa_audit.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_analysis.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_storage_tier.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
consent_audit.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
contractor_review.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cores_frn_registration.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cpni_certification.py Fix MinioStorage.upload_file → .upload + suppress instant delivery during eSign pause 2026-05-04 10:59:45 -05:00
dc_agent.py Fix MinioStorage.upload_file → .upload + suppress instant delivery during eSign pause 2026-05-04 10:59:45 -05:00
dnc_review.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
dot_drug_alcohol.py DOT D&A binder: add driver enrollment guidance + Form G roster 2026-06-02 21:39:50 -05:00
dot_esign.py fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment 2026-06-09 14:40:46 -05:00
ein_application.py Wire fulfillment alerts to Telegram + surface order progress in portal + even out ERPNext sync 2026-06-07 03:17:46 -05:00
esign_stamp.py trucking: stamp e-signature exactly on form signature lines + state authorization gate 2026-06-02 16:44:19 -05:00
fcc_carrier_registration.py fix(email): add text/plain part to every transactional + telecom email 2026-06-17 21:07:40 -05:00
fcc_compliance_checkup.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fcc_full_compliance.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
flowroute.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
flsa_audit.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fmcsa_web_submitter.py add dev mode guards: skip FMCSA submission, fax, and web filing in non-production environments 2026-05-30 22:28:59 -05:00
foreign_carrier_affiliation.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
foreign_qualification.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
form_499_initial.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
form_499a.py Fix MinioStorage.upload_file → .upload + suppress instant delivery during eSign pause 2026-05-04 10:59:45 -05:00
form_499a_discontinuance.py fix(email): add text/plain part to every transactional + telecom email 2026-06-17 21:07:40 -05:00
form_499q.py fix(email): add text/plain part to every transactional + telecom email 2026-06-17 21:07:40 -05:00
gov_fee.py feat(sc-coc): SCDMV Certificate of Compliance PDF filler + correct $25 state fee 2026-06-16 09:08:50 -05:00
handbook_review.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
hazmat_phmsa.py fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment 2026-06-09 14:40:46 -05:00
ink_signature_plotter.py mcs150: enrich intake from FMCSA carrier census before PDF fill 2026-06-10 12:35:52 -05:00
intrastate_filing.py feat(intrastate): automate state PUC/PSC authority filing (email + invoice + auto-bill) 2026-06-16 07:57:57 -05:00
irp_filing.py feat(intrastate): automate state PUC/PSC authority filing (email + invoice + auto-bill) 2026-06-16 07:57:57 -05:00
mailbox_setup.py fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment 2026-06-09 14:40:46 -05:00
mcs150_update.py fix(mcs150): point intake email to per-slug wizard (not sales page) + add Trailers field 2026-06-16 16:21:57 -05:00
new_carrier_bundle.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
npi_provider.py esign: make signing copy fully generic - remove all ink references from website/API 2026-06-07 05:06:26 -05:00
ocn_registration.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
porkbun.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
privacy_policy.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
renewal_handler.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
rmd_filing.py fix(email): add text/plain part to every transactional + telecom email 2026-06-17 21:07:40 -05:00
sc_coc_filing.py tweak(sc-coc): tell carrier to check with insurer before answering + Reply-To info@ 2026-06-16 09:35:13 -05:00
signature_stamper.py trucking: stamp e-signature exactly on form signature lines + state authorization gate 2026-06-02 16:44:19 -05:00
state_puc_filing.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
state_trucking.py feat(sc-coc): SC intrastate Certificate of Compliance flow (insurance gate -> $25 fee -> file) 2026-06-16 09:15:55 -05:00
state_trucking_authorization.py trucking: stamp e-signature exactly on form signature lines + state authorization gate 2026-06-02 16:44:19 -05:00
stir_shaken.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
ucr_playwright.py feat(ucr): Playwright auto-filing for UCR registration on approval 2026-06-16 03:29:05 -05:00