Send e-mails with attachments for Meteor.
meteor add ashutosh:email-att
EmailAtt
works just like Meteor's Email.send
. You set all the same options and call EmailAtt.send()
.
EmailAtt
supports multiple attachments via an array of Objects inside the option attachmentOptions
.
Each object needs to be compliant with objects that mailcomposer accepts. You can see details in the mailcomposer documentation.
A simple text file example is described below.
EmailAtt.send({to:"ashutosh@test.com",
from:"ashutosh@test.com",
subject: "Test attachment",
// A list of attachments.
attachmentOptions: [
// Each attachment conforms to mailcomposer's specs.
{
fileName: "todo.txt",
contents: "this is a test attachment."
}
],
text: "There's an attachment in this email. See the attachment."});
- I haven't tested it thoroughly.
- I'm not sure how it interacts with Meteor's
MAIL_URL
.