code wiki / _hdl_build / nx_cms_email.nx

nx_cms_email.nx

buildroot/runtime/_hdl_build/nx_cms_email.nx

3019 B63 linesdepth 3pulls 3 transitivereach 4 importersview sourcekind librarytopic cms
docsdependenciesstructsconstsfunctions

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

nx_fnv.nx nx_syscalls.nx nx_cms_email.nx nx_cms_booking.nx nx_cms_email_exceed_gate.nx nx_cms_email_gate.nx

imports: nx_fnv.nxnx_syscalls.nx

imported by: nx_cms_booking.nxnx_cms_email_exceed_gate.nxnx_cms_email_gate.nx

structs

none

consts

12const NX_SUB_PENDING: i64 = 0
13const NX_SUB_CONFIRMED: i64 = 1
14const NX_SUB_UNSUBSCRIBED: i64 = 2

functions

16func 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
20func email_confirm_token(list: *u8, email: *u8) -> i64
29func email_subscribe() -> i64 { return NX_SUB_PENDING }
called by 2: mainmain
34func email_confirm(state: i64, provided: i64, list: *u8, email: *u8) -> i64
called by 2: mainmain calls 1: email_confirm_token
42func email_unsubscribe(state: i64) -> i64 { return NX_SUB_UNSUBSCRIBED }
called by 2: mainmain
45func email_on_send_list(state: i64) -> i64 { if state == NX_SUB_CONFIRMED { return 1 } return 0 }
called by 2: mainmain
48func email_addr_valid(s: *u8) -> i64
called by 2: mainmain