email
SMTP mail objects, templates, validation (host `__smtp_*`).
Load with: use email
Quick example
use email
result = emnew("value", 8080, "value")
prn(result)
Functions
SMTP session
emnew(host, port, opts)
Performs the operation. Takes host, port, opts.
emcon(m)
Performs the operation. Takes m.
emcls(m)
Lists items. Takes m.
Message record
emmsg(opts)
Performs the operation. Takes opts.
emto(m, a, n)
Converts to another format. Takes m, a, n.
emcc(m, a, n)
Performs the operation. Takes m, a, n.
embcc(m, a, n)
Performs the operation. Takes m, a, n.
emfro(m, a, n)
Performs the operation. Takes m, a, n.
emsub(m, s)
Performs the operation. Takes m, s.
emtxt(m, t)
Performs the operation. Takes m, t.
emhtm(m, h)
Performs the operation. Takes m, h.
ematt(m, f, c, mt)
Performs the operation. Takes m, f, c, mt.
emattf(m, pth, fnm)
Performs the operation. Takes m, pth, fnm.
emmim(path_or_name)
Performs the operation. Takes path_or_name.
emsen(m, msg)
Encodes. Takes m, msg.
Template string ({{key}})
emtpl(tpl, vars)
Performs the operation. Takes tpl, vars.
emtplf(pth, vars)
Performs the operation. Takes pth, vars.
emmjm(pth)
Performs the operation. Takes pth.
Validation / parse
emval(a)
Performs the operation. Takes a.
empar(a)
Performs the operation. Takes a.
Bulk (sequential; uses limsl between sends)
embul(m, tpl, recips, fn)
Performs the operation. Takes m, tpl, recips, fn.
Webhook HMAC check (caller compares hex)
emwhv(pl, sig, sec)
Performs the operation. Takes pl, sig, sec.
In-memory test mailbox
emtes()
Performs the operation.
emtse(t, msg)
Sets a value. Takes t, msg.
emtla(t)
Performs the operation. Takes t.
emtcl(t)
Closes or clears. Takes t.
Notes
- Email composition and sending via SMTP.