Hi all,
Just wondering if anyone had any ideas on how I could save attachments from email coming in via the NetSuite Email Capture plugin into the File Cabinet. After reading the help, forums and google I can't see a way to do this.
In my code currently, the email is received by the plugin, the email contents are read (to, from, subject, body and attachment details), after the normal check are completed, if the email contains an attachment then the code breaks into a function called downloadAttachment. In this function it checks the attachment extension and if it's a pdf then i would like this to be saved into a cabinet folder.
I have run out of ideas for the saving component and any help would be very much appreciated
function downloadAttachment(label, attachment)
{
var attachmentextension = attachment.getType()
if(attachmentextension='PDF') {
//Save attachment
logAttachment('att', attachments[indexAtt]);
}
}