Skip to content

codeEmail

Pure builders for the OTP code email’s copy - subject, preheader, and the HTML and text bodies. No transport, no @dbx-tools/email import, so this module is safe to load whether or not the optional email dependency is present; the actual send lives in ./send-code.

The shapes here are load-bearing for mobile autofill: the code rides in the SUBJECT and the PREHEADER (the whole of a push notification), and the text part keeps the prompt and code on ONE line. See each function for why.