diff --git a/README.md b/README.md index c5daf68..4f265c6 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,8 @@ Please inspect the provided sample code for details. from: 'Name ', // Override global 'From: ' option. cc: 'Name ', // Optional. bcc: 'Name ', // Optional. - data: {} // Optional. Render your email with a data object. + data: {}, // Optional. Render your email with a data object. + attachments: {} // Optional. Attach files using a mailcomposer format. } ``` diff --git a/lib/mailer.js b/lib/mailer.js index ee48d1f..07e3802 100644 --- a/lib/mailer.js +++ b/lib/mailer.js @@ -233,7 +233,8 @@ const factory = (options) => { replyTo: Match.Optional(Match.OneOf(String, [String])), from: Match.Optional(String), data: Match.Optional(Object), - headers: Match.Optional(Object) + headers: Match.Optional(Object), + attachments: Match.Optional([Object]) }); const defaults = {