andris9/Nodemailer — Issue #49: how can I send a image as attachment
Author: wahyd4
Created: 2011-10-26 12:45:45+00:00
State: open

As the title said,I can't send a image as attachement. and my code is like this:
var attachment = [
{
'filename':'cat.jpg',
'contents': new Buffer('img',encoding='ascii'),
}
];

mail.send_mail(
{
sender:'wahyxxxx@qq.com',
to:'wahydxxxx@gmail.com',
subject:'none',
attachments: attachment,
body:'a attachment'
},

I tried every kind of encoding,and all failed.
please help me to figure out this problem.