Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed May 15, 2024
1 parent c62673d commit c20bf5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/Outbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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`.
Expand Down

0 comments on commit c20bf5c

Please sign in to comment.