Skip to content

Commit

Permalink
chore: add example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zackschuster committed Sep 3, 2021
1 parent 0d497e9 commit 52b8271
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,21 @@ const options = {
};
```

## Message#checkValidity()

Synchronously validate that a Message is properly formed.

```js
const message = new Message(options);
const { isValid, validationError } = message.checkValidity();
if (isValid) {
// ...
} else {
// first error encountered
console.error(validationError);
}
```

## new SMTPConnection(options={})

```js
Expand Down

0 comments on commit 52b8271

Please sign in to comment.