You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

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.

addAddress(address, displayName)

This method adds the address to the email list.

Parameter(s):

NameTypeMandatoryDefault Value
addressStringYN
displayNameString or NullN'NULL'


Return:

TypeDescription
VoidThis method does not return a value.


Example:

addAddress
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.addAddress('test@example.com', 'firstname lastname');
})(current, template, email, event);

addAddressBcc(address, displayName)

This method adds the address to the BCC's emails list.


Parameter(s):

NameTypeMandatoryDefault Value
addressStringYN
displayNameString or NullN'NULL'


Return:

TypeDescription
VoidThis method does not return a value.


Example:

addAddressBcc
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.addAddressBcc('test@example.com', 'firstname lastname');
})(current, template, email, event);

addAddressCc(address, displayName)

This method adds the address to the CC's emails list.


Parameter(s):

NameTypeMandatoryDefault Value
addressStringYN
displayNameString or NullN'NULL'


Return:

TypeDescription
VoidThis method does not return a value.


Example:

addAddressCc
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.addAddressCc('test@example.com', 'firstname lastname');
})(current, template, email, event);

getAddresses()

This method gets the recipients' addresses.


Return:

TypeDescription
StringA string containing the recipient's addresses.


Example:

getAddresses
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.getAddresses();
})(current, template, email, event);

getAddressesBcc()

This method gets the recipients' BCC addresses.


Return:

TypeDescription
StringA string containing the recipient's BCC addresses.


Example:

getAddressesBcc
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.getAddressesBcc();
})(current, template, email, event);

getAddressesCc()

This method gets the recipients' CC addresses.


Return:

TypeDescription
StringA string containing the recipient's CC addresses.


Example:

getAddressesCc
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.getAddressesCc();
})(current, template, email, event);

getBody()

This method gets the message body.


Return:

TypeDescription
StringThe message body.


Example:

getBody
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.getBody();
})(current, template, email, event);

getFrom()

This method gets the sender's address.


Return:

TypeDescription
StringA string containing the sender's address.


Example:

getForm
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.getFrom();
})(current, template, email, event);

getReplyTo()

This method gets the replyTo address.


Return:

TypeDescription
StringA string containing the replyTo address.


Example:

getReplyTo
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.getReplyTo();
})(current, template, email, event);

getSubject()

This method returns the message subject line.


Return:

TypeDescription
StringA string containing the message subject line.


Example:

getSubject
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.getSubject();
})(current, template, email, event);

setBody(bodyText)

This method sets the message body.


Parameter(s):

NameTypeMandatoryDefault Value
bodyTextStringYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

setBody
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.setBody(`Additional comments have been added to ${current.number}`);
})(current, template, email, event);

setFrom(address)

This method sets the sender's address.


Parameter(s):

NameTypeMandatoryDefault Value
addressStringYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

setFrom
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.setFrom('test@example.com');
})(current, template, email, event);

setReplyTo(address)

This method sets the replyTo address.


Parameter(s):

NameTypeMandatoryDefault Value
addressStringYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

setReplyTo
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.setReplyTo('test@example.com');
})(current, template, email, event);

setSubject(subject)

This method sets the email subject line.


Parameter(s):

NameTypeMandatoryDefault Value
subjectStringYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

setSubject
(function runNotificationScript(
    /* SimpleRecord */ current, 
    /* SimpleTemplatePrinter */ template,
    /* SimpleEmailOutbound */ email,
    /* SimpleRecord */ event
    ) {
  email.setSubject('Additional comments have been added');
})(current, template, email, event);

  • No labels