module function · N/email

send()

email.send(options)

Sends transactional email to an individual or group of recipients and receives bounceback notifications.

Implementation
Not started
Design
Open for proposals suggest how it should read
Proposals
A
Signature
email.send(options)
Module
N/email
Returns
void
Governance
20 units
Script types
Client and server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2015.2
call shapefrom Oracle's parameter table
1email.send({2    author:     /* number, required */,3    body:       /* string, required */,4    recipients: /* number | string | number[] | string[], required */,5    subject:    /* string, required */,6    bcc:        /* number[] | string[], optional */,7    cc:         /* number[] | string[], optional */,8    replyTo:    /* string, optional */9});
Oracle reference for this method
ParameterTypeRequiredDescription
options.authornumberrequiredInternal ID of the email sender. To find the internal ID of the send in the UI, go to Lists > Employees . If the ADMI_VICARIOUS_EMAILS permission is set, the sender ID can be set to a different sender to allow users to send email on another user's behalf. The role executing the script is required to have the Vicarious Email permission for the script to complete. For more information about permissions, see the help topic NetSuite Permissions Overview .
options.bodystringrequiredContents of the outgoing message. SuiteScript formats the body of the email in either plain text or HTML. If HTML tags are present, the message is formatted as HTML. Otherwise, the message is formatted in plain text. To display XML as plain text, use an HTML <pre> tag around the XML.
options.recipientsnumber | string | number[] | string[]requiredThe internal ID or email address of the recipient(s). For multiple recipients, use an array of internal IDs or email addresses. You can use an array that contains a combination of internal IDs and email addresses. A maximum of 10 recipients ( options.recipients + options.cc + options.bcc ) is allowed. Note: Only the first recipient displays on the Communication subtab (under the Recipient column). To view all recipients, click View to open the Message record.
options.subjectstringrequiredSubject of the outgoing message.
options.bccnumber[] | string[]optionalThe internal ID or email address of the recipient(s) to blind copy. For multiple recipients, use an array of internal IDs or email addresses. You can use an array that contains a combination of internal IDs and email addresses. A maximum of 10 recipients ( options.recipients + options.cc + options.bcc ) is allowed.
options.ccnumber[] | string[]optionalThe internal ID or email address of the secondary recipient(s) to copy. For multiple recipients, use an array of internal IDs or email addresses. You can use an array that contains a combination of internal IDs and email addresses. A maximum of 10 recipients ( options.recipients + options.cc + options.bcc ) is allowed.
options.replyTostringoptionalThe email address that appears in the reply-to header. You can use either a single external email address or a generic email address created by the Email Capture Plug-in.
B

No Mynt syntax yet.

Nothing in the language compiles to email.send(options) today. How should it read?

C

Competing syntax for send, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

Loading proposals from GitHub…

D

Write the Mynt you wish you could write.

A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.

  • Clarity. Does it say what happens, without ceremony?
  • Consistency. Does it read like load, save and Ref[field]?
  • Expressiveness. Does it cover the cases people actually write?
  • Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?

N/email · email.send(options)

Suggest syntax for send