This server-side class is intended to implement to the email objects for applications; use these methods along with the email global object available in mail scripts.
This method adds the address to the email list.
Parameter(s):
Name | Type | Mandatory | Default Value |
---|
address | String | Y | N |
displayName | String |
|
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | addAddress |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.addAddress('test@example.com', 'example');
})(current, template, email, event); |
This method adds the address to the BCC's emails list.
Parameter(s):
Name | Type | Mandatory | Default Value |
---|
address | String | Y | N |
displayName | String |
|
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | addAddressBcc |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.addAddressBcc('test@example.com', 'copy2 example');
})(current, template, email, event); |
This method adds the address to the CC's emails list.
Parameter(s):
Name | Type | Mandatory | Default Value |
---|
address | String | Y | N |
displayName | String |
|
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | addAddressCc |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.addAddressCc('test@example.com', 'copy example');
})(current, template, email, event); |
This method gets the recipients' addresses.
Return:
Type | Description |
---|
String | A string containing the recipient's addresses. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | getAddresses |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.getAddresses();
})(current, template, email, event); |
This method gets the recipients' BCC addresses.
Return:
Type | Description |
---|
String | A string containing the recipient's BCC addresses. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | getAddressesBcc |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.getAddressesBcc();
})(current, template, email, event); |
This method gets the recipients' CC addresses.
Return:
Type | Description |
---|
String | A string containing the recipient's CC addresses. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | getAddressesCc |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.getAddressesCc();
})(current, template, email, event); |
This method gets the message body.
Return:
Type | Description |
---|
String | The message body. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | getBody |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.getBody();
})(current, template, email, event); |
This method gets the sender's address.
Return:
Type | Description |
---|
String | A string containing the sender's address. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | getForm |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.getFrom();
})(current, template, email, event); |
This method gets the replyTo address.
Return:
Type | Description |
---|
String | A string containing the replyTo address. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | getReplyTo |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.getReplyTo();
})(current, template, email, event); |
This method returns the message subject line.
Return:
Type | Description |
---|
String | A string containing the message subject line. |
Example:
Code Block |
---|
language | js |
---|
title | getSubject |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.getSubject();
})(current, template, email, event); |
This method sets the message body.
Parameter(s):
Name | Type | Mandatory | Default Value |
---|
bodyText | String | Y | N |
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | setBody |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.setBody('Simple');
})(current, template, email, event); |
This method sets the sender's address.
Parameter(s):
Name | Type | Mandatory | Default Value |
---|
address | String | Y | N |
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | setFrom |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.From('test@example.com');
})(current, template, email, event); |
This method sets the replyTo address.
Parameter(s):
Name | Type | Mandatory | Default Value |
---|
address | String | Y | N |
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | setReplyTo |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.setReplyTo('test@example.com');
})(current, template, email, event); |
This method sets the email subject line.
Parameter(s):
Name | Type | Mandatory | Default Value |
---|
subject | String | Y | N |
Return:
Type | Description |
---|
Void | This method does not return a value. |
Example:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | setSubject |
---|
|
(function runNotificationScript(
/* SimpleRecord */ current,
/* SimpleTemplatePrinter */ template,
/* SimpleEmailOutbound */ email,
/* SimpleRecord */ event
) {
email.setSubject('Change Request');
})(current, template, email, event); |