Options
All
  • Public
  • Public/Protected
  • All
Menu

Message

The Message object can be used to create and send mail iMessages, similar to those created by a "Message" action step.

Examples

var msg = Message.create();
msg.toRecipients = ["joe@sample.com"];
msg.subject = "My test message";
msg.body = "Body text";

var success = msg.send();

Hierarchy

  • Message

Index

Properties

body

body: string

Body text of the mail message.

isSent

isSent: boolean

true/false flag indicated if the message object has already been sent.

status

status: "created" | "sent" | "messagesUnavailable" | "userCancelled" | "unknownError"

One of the following strings

  • created: Initial value before send() has been called.
  • sent: The message was sent successfully.
  • messagesUnavailable: On iOS, Mail.app services were not available.
  • userCancelled: The user cancelled the Mail.app window without sending.
  • unknownError: An unknown error occurred.

subject

subject: string

Subject line. Only used if subject is enabled in Messages settings on the device.

toRecipients

toRecipients: string[]

Array of phone numbers and email addresses to use as To: recipients.

Methods

send

  • send(): boolean
  • Send the message. This will open the Messages.app sending window. Returns true if the message was sent successfully or false if not - if, for example, the user cancelled the message window.

    Returns boolean

Static create

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