problem with attachment mailpro plugin

hi, i have a problem with attacchment mailpro plugin.

I have this code:

var vFilePath = ‘c:/devlist.txt’;
var vAttachment = plugins.MailPro.TextAttachment(vFilePath);
vNewMessage = vSmtp.createMessage(‘xxxr@gmail.com’, ‘xxx@gmail.com’, ‘A test message’, vAttachment.name);
vSuccess = vSmtp.sendMessage(vNewMessage);

but the mail does not send the attachment, nel corpo viene scritto il nome del file!!

how to send mail with attachments??
tnk…

I’m not really familiar with the mailpro plugin, but it doesn’t seem correct to me that you use vAttachment.name in the createMessage call.

thanks for reply…
I solved this by inserting instructions before sending the mail:

vNewMessage.addAttachment(vAttachment)

// Send the message
vSuccess = vSmtp.sendMessage(vNewMessage);