Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

GlideEmailOutbound- Scoped

The scoped GlideEmailOutbound API implements the email object for scoped applications. You can use the GlideEmailOutbound methods with the email global object available in mail scripts. The email object behaves identically for global and scoped applications.

Parent Topic:Server API reference

GlideEmailOutbound - GlideEmailOutbound()

Instantiates a scoped GlideEmailOutbound object.

NameTypeDescription
None  

GlideEmailOutbound - addAddress(String type, String address)

Adds the address to either the cc or bcc list.

NameTypeDescription
typeStringEither cc or bcc, determines the list to which the address is added.
addressStringThe recipient's email address.
TypeDescription
void 
email.addAddress('cc', 'joe.employee@something.com');

GlideEmailOutbound - addAddress(String type, String address, String displayName)

Adds the recipient to either the cc or bcc list, but uses the display name instead of the address when showing the recipient.

NameTypeDescription
typeStringEither cc or bcc, determines the list to which the address is added.
addressStringThe recipient's email address.
displayNameStringThe name to be shown instead of the email address.
TypeDescription
void 
email.addAddress('bcc', 'joe.employee@something.com', 'dudley rocks');

GlideEmailOutbound - getSubject()

Returns the email's subject line.

NameTypeDescription
None  
TypeDescription
StringThe email's subject line.

GlideEmailOutbound - getWatermark()

Returns the email's watermark.

NameTypeDescription
None  
TypeDescription
StringThe email's watermark.
var watermark = email.getWatermark();

GlideEmailOutbound - setBody(String bodyText)

Sets the body of the email.

NameTypeDescription
bodyTextStringThe body of the email.
TypeDescription
void 
email.setBody('Dear Sir, ...');

GlideEmailOutbound - setFrom(String address)

Sets the sender's address.

NameTypeDescription
addressStringThe sender's email address.
TypeDescription
void 
email.setFrom('joe.employee@something.com');

GlideEmailOutbound - setReplyTo(String address)

Sets the reply to address.

NameTypeDescription
addressStringThe reply to email address.
TypeDescription
void 
email.setReplyTo('joe.employee@something.com');

GlideEmailOutbound - setSubject(String subject)

Sets the email's subject line.

NameTypeDescription
subjectStringText for the subject line.
TypeDescription
void 
email.setSubject('Important Issues to discuss');