composeMail

Invokes the user's default mail application for a new mail to send.

Syntax

ui.Interface.frontCall("mobile", "composeMail",
   [to, subject, content, cc, bcc, attachments ...],
   [result])

Usage

The "composeMail" front call invokes the user's default mail application and sets up a new mail to send.

The returned result string can take one of the following values:
  • "ok": The email was send.
  • "cancel": The email was canceled.
  • "saved": The email was saved.
  • "failed: reason": The email could not be sent.

This example opens an email and populates the To, CC, and BCC fields, the Subject line, the message body, and it specifies two attachments..

DEFINE result STRING
CALL ui.Interface.frontCall("mobile", "composeMail",
 ["john.doe@4js.com,jane.doe@4js.com", "Hello world",
  "This is the hello world text", "john.doe@4js.com,jane.doe@4js.com", "hidden@4js.com",
  "/sdcard/Pictures/photo1.jpg", "/sdcard/Pictures/photo2.jpg" ], [result])

The next example opens an email and populates the To field, the Subject line, and the message body. No CC or BCC recipients and no attachments are specified.

DEFINE result STRING
CALL ui.Interface.frontCall("mobile","composeMail",
 ["huhu@haha.com","test mail","sent from my device"],[result])