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


let msg = Message.create();
msg.toRecipients = [""];
msg.subject = "My test message";
msg.body = "Body text";

let success = msg.send();


  • Message



body: string

Body text of the mail message.

isSent: boolean

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

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

One of the following strings

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

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

toRecipients: string[]

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


  • Send the message. This will open the 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

Generated using TypeDoc