Shelby Owens
02/16/2026, 3:16 PMCeligo AI
02/16/2026, 3:16 PMAI generated answer (using internal Slack threads):To send an email with a Suitelet, you can use the
email.send function provided by NetSuite. This function allows you to specify the recipient, subject, body, and attachments for the email. Here is a sample code snippet:
javascript
var fileId = nlapiSubmitFile({
name: 'filename.jpg',
fileType: 'JPGIMAGE',
content: fileContent,
folder: folderId
});
var emailRecipient = '<mailto:recipient@example.com|recipient@example.com>';
var emailSubject = 'Your file';
var emailBody = 'Please find the attached file.';
email.send({
author: nlapiGetUser(),
recipients: emailRecipient,
subject: emailSubject,
body: emailBody,
attachments: [fileId]
});
In this example, fileContent is the content of the file you want to attach, and folderId is the ID of the folder where you want to store the file.
To forward the exact email to a different user, you can simply call the email.send function again with the new recipient. Here is a sample code snippet:
javascript
var newRecipient = '<mailto:newrecipient@example.com|newrecipient@example.com>';
email.send({
author: nlapiGetUser(),
recipients: newRecipient,
subject: emailSubject,
body: emailBody,
attachments: [fileId]
});
In this example, newRecipient is the email address of the new recipient.
Please note that you need to have the necessary permissions to send emails and manage files in NetSuite.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/16/2026, 3:16 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836669922
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834289551
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830505431
Celigo AI
02/16/2026, 3:16 PM