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
A
suitescript api
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});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.author | number | required | Internal 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.body | string | required | Contents 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.recipients | number | string | number[] | string[] | required | The 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.subject | string | required | Subject of the outgoing message. |
| options.bcc | number[] | string[] | optional | The 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.cc | number[] | string[] | optional | The 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.replyTo | string | optional | The 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
mynt syntax
No Mynt syntax yet.
Nothing in the language compiles to email.send(options) today. How should it read?
C
community proposals
Competing syntax for send, from GitHub Discussions. Select two or more to compare them side by side.
Loading proposals from GitHub…
D
suggest an alternative
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,saveandRef[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?