The Message object can be used to create and send mail iMessages, similar to those created by a "Message" action step.
var msg = Message.create();
msg.toRecipients = ["firstname.lastname@example.org"];
msg.subject = "My test message";
msg.body = "Body text";
var success = msg.send();
Create new instance.
Body text of the mail message.
true/false flag indicated if the message object has already been sent.
One of the following strings
send()has been called.
Subject line. Only used if subject is enabled in Messages settings on the device.
Array of phone numbers and email addresses to use as
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.
Generated using TypeDoc