From c20bf5c4c0c7fef54640aea37c6e3e56b07aa9e3 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 15 May 2024 13:32:47 -0700 Subject: [PATCH] more fixes --- docs/Outbound.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Outbound.md b/docs/Outbound.md index 2f458b21b..67d3f2460 100644 --- a/docs/Outbound.md +++ b/docs/Outbound.md @@ -200,7 +200,7 @@ const contents = [ "Some email body here", ""].join("\n"); -outbound.send_email(from, to, contents, (code, msg) => { +const outnext = (code, msg) => { switch (code) { case DENY: this.logerror("Sending mail failed: " + msg); break; @@ -210,7 +210,9 @@ outbound.send_email(from, to, contents, (code, msg) => { default: this.logerror("Unrecognized return code from sending email: " + msg); next(); } -}) +} + +outbound.send_email(from, to, contents, outnext) ``` The callback on `send_email()` is passed `OK` if the mail is successfully queued, not when it is successfully delivered. To check delivery status, you need to hook `delivered` and `bounce`.