Skip to content
This repository was archived by the owner on Apr 8, 2021. It is now read-only.

Commit 2f53fb1

Browse files
authored
Merge pull request #26 from parse-community/alllow-more-options
Allow user to pass any options they want to mailgun.
2 parents a927efe + 8315fe6 commit 2f53fb1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@ var SimpleMailgunAdapter = mailgunOptions => {
88
var mailgun = Mailgun(mailgunOptions);
99

1010
var sendMail = mail => {
11-
var data = {
12-
from: mailgunOptions.fromAddress,
13-
to: mail.to,
14-
subject: mail.subject,
15-
text: mail.text,
16-
}
11+
var data = Object.assign({}, mail, { from: mailgunOptions.fromAddress });
1712

1813
return new Promise((resolve, reject) => {
1914
mailgun.messages().send(data, (err, body) => {
2015
if (typeof err !== 'undefined') {
2116
reject(err);
17+
return;
2218
}
2319
resolve(body);
2420
});

0 commit comments

Comments
 (0)