Send an email
Confirm outbound mail is wired up with one call, before a real notification depends on it.
test_email sends one real message through the same Stalwart submission path every platform email
uses, @xuda.ai outbound, DKIM and SPF aligned. There is nothing to configure first: call it, check
the inbox (or the error), and you know outbound mail works before anything else in your integration
depends on it.
Method
Test Email
Runs a test for email.
test_email declares one mandatory field, email. The handler also reads an optional app_id
(pulls that project's branding into the template; omitted means the platform's own Xuda branding)
and an optional from (a different Xuda mailbox to send as, its own submission credential has to
already exist server-side). Both are reproduced below from source, not from the registry.
Walkthrough
The response
data is nodemailer's own SMTP result object, passed straight through:
code: 1 means the submission server accepted the message for delivery, not that it landed in the
inbox, accepted is the address list Stalwart itself confirmed, and a non-empty rejected on an
otherwise code: 1 response means Stalwart accepted some recipients and refused others. There is no
delivery webhook behind this call: a code: 1 response is the whole signal you get from test_email
itself.