I have a form handle with angular that users populate for their application. It works fine, I use the Mandrill API to send the e-mail like this:
var m = new mandrill.Mandrill('your_api_key'); // This will be public
function sendTheMail(){
m.messages.send({
"message": {
"from_email": "your_email_address",
"from_name": "your_name",
"to":[{"email": "someone's_email_address", "name": "someone's_name"}], // Array of recipients
"subject": "optional_subject_line",
"text": "Text to be sent in the body" // Alternatively, use the "html" key to send HTML emails rather than plaintext
}
});
}
Now I'd like to enable users to add a pdf attachment to their application. I can limit the format to PDF and the size to be relatively small.
What is the simplest way to do so? Do I need to add a module like https://github.com/nervgh/angular-file-upload?
Many thanks