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`.