code wiki / _hdl_build / nx_cms_email.nx
nx_cms_email.nx
buildroot/runtime/_hdl_build/nx_cms_email.nx
about
nx_cms_email.nx -- CMS EMAIL / CRM / NEWSLETTER (sovereign double-opt-in subscriber engine). The
Mailchimp/HubSpot class, made Nishi-native: the subscriber list lives ON-BOX and NEVER leaves for a
cloud ESP (privacy-native, the exceed angle), confirmation is DOUBLE OPT-IN by default (a fresh
subscribe is PENDING, never auto-confirmed = no list-bombing / GDPR-correct), and the confirm token
is DETERMINISTIC -- derived from (list-salt, email) via the canonical nx_fnv, so it is recomputable
and needs no stored-token table. Only CONFIRMED subscribers are ever on the send list. Composes
nx_fnv (cardinal: never re-implement a hash inline). license_tier: ORIGINAL
dependencies 2 imports · 3 importers
imports: nx_fnv.nxnx_syscalls.nx
imported by: nx_cms_booking.nxnx_cms_email_exceed_gate.nxnx_cms_email_gate.nx
structs
| none |
consts
| 12 | const NX_SUB_PENDING: i64 = 0 |
| 13 | const NX_SUB_CONFIRMED: i64 = 1 |
| 14 | const NX_SUB_UNSUBSCRIBED: i64 = 2 |
functions
| 16 | func em_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: email_confirm_token |
| 20 | func email_confirm_token(list: *u8, email: *u8) -> i64 |
| 29 | func email_subscribe() -> i64 { return NX_SUB_PENDING } |
| 34 | func email_confirm(state: i64, provided: i64, list: *u8, email: *u8) -> i64 |
| 42 | func email_unsubscribe(state: i64) -> i64 { return NX_SUB_UNSUBSCRIBED } |
| 45 | func email_on_send_list(state: i64) -> i64 { if state == NX_SUB_CONFIRMED { return 1 } return 0 } |
| 48 | func email_addr_valid(s: *u8) -> i64 |