how to send mail in pdf format in netsuite using script code example
Example: how to send mail in pdf format in netsuite using script
function execute(context) {
var pdf1 = 483;
var pdf2 = 484;
var pdffile2 = file.load({id:pdf2});
email.send({
author: 343,
recipients: ['[email protected]'],
subject: 'Test Email with Attachements',
body: 'email body',
attachments: [pdffile2]
});
}
function attachfile(recType, recId, recTypeTo, recIdTo) {
record.attach({
record: {
type: recType,
id: recId
},
to: {
type: recTypeTo,
id: recIdTo
}
});
}