Hi I am using the following nodemailer code:
// setup e-mail data with unicode symbols
var mailOptions = {
from: results.send, // sender address
to: results.recieve, // list of receivers
subject: results.subject, // Subject line
text: results.message, // plaintext body
attachments: [{
filename: "testpicture.png",
content: new Buffer(results.attachment, "base64"),
}]
};
where my attachment (aka results.attachment) is a data URI like this:
data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0......
I also tried using the URI without the first part, just : PD94bWwgdmVyc2lvbj0.......
but to no avail :(
I'm not sure what the appropriate syntax is...should my URI just be the gibberish after base64 in this data above?
I think my syntax is off but I just can't get it to work.
The email goes through and all, but the 512KB file it sends as an attachment cant be open. What am I doing wrong?