Options
All
  • Public
  • Public/Protected
  • All
Menu

OutlookMessage

The OutlookMessage object can be used to create and send mail messages through Outlook.com integrated accounts, similar to those created by a Outlook action step. Creating and sending these messages happens in the background, with no user interface, so messages must be complete with recipients before calling send(). Sending is done via the Microsoft Graph API. Outlooks accounts are authenticated when used for the first time using OAuth - to use more than one account, call create with different identifier parameters.

Example

let message = OutlookMessage.create();
message.toRecipients = ["joe@sample.com", "Jim Test <jim@test.com>"];
message.subject = "My test message";
message.body = "Body text";

var success = message.send();
if (!success) {
  console.log("Sending outlook message failed");
  context.fail();
}

Hierarchy

  • OutlookMessage

Index

Properties

bccRecipients

bccRecipients: string[]

Array of email addresses to use as BCC: recipients. Each entry can be a valid email address, or a name and email in the format Name<email>.

body

body: string

Body text of the mail message. Can be plain text or HTML if the isBodyHTML property is set to true.

ccRecipients

ccRecipients: string[]

Array of email addresses to use as CC: recipients. Each entry can be a valid email address, or a name and email in the format Name<email>.

isBodyHTML

isBodyHTML: boolean

whether to treat the body string and plain text or HTML. When set to true, the body property should be set to full valid HTML.

subject

subject: string

toRecipients

toRecipients: string[]

Array of email addresses to use as To: recipients. Each entry can be a valid email address, or a name and email in the format Name<email>.

Methods

send

  • send(): boolean

Static create

  • create a new object.

    Parameters

    • Optional identifier: string

      notes which for Outlook account to use. This string is an arbitrary value, but we recommend using the email address you wish to associate with the script. Each unique identifier will be associated with its own Credential.

    Returns OutlookMessage

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc