Modules
SuiteScript 2.0
{email}.send({author: {number*},body: {string*},recipients: {number | string | number[] | string[]*},subject: {string*},attachments: {| file.File[]},bcc: ${7:number[] | string[]},cc: ${8:number[] | string[]},isInternalOnly: ${9:boolean},relatedRecords: {0:Object},replyTo: {1:string}})
N/email Module
email.send()
Method Description:
Sends email to an individual or group of recipients and receives bounceback notifications.
A maximum of 10 recipients (recipient + cc + bcc) is allowed.
The total message size (including attachments) must be 20MB or less. The size of each individual attachment cannot exceed 10MB.
Returns:
void
Supported Script Types:
Client and server scripts
For additional information, see SuiteScript 2.0 Script Types.
Governance:
20 units
Module:
N/email Module
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=email.send(options)
Example:
// Code Example 1
//Add additional code
.
var senderId = -5;
var recipientEmail = 'notify@myCompany.com';
var timeStamp = new Date().getUTCMilliseconds();
var recipientId = 12;
var fileObj = file.load({
id: 88
});
email.send({
author: senderId,
recipients: recipientId,
subject: 'Test Sample Email Module',
body: 'email body',
attachments: [fileObj],
relatedRecords: {
entityId: recipientId,
customRecord:{
id:recordId,
recordType: recordTypeId //an integer value
}
}
});
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4358681681.html