Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25] Titanium.UI.createEmailDialog

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:50:09.000+0000
Affected Version/sn/a
Fix Version/sRelease 0.6.0
ComponentsiOS
Labelsn/a
ReporterNolan Wright
AssigneeBlain Hamon
Created2011-04-15T02:22:40.000+0000
Updated2011-04-17T01:50:09.000+0000

Description

Description

The purpose of this API is to display an email dialog for sending a mesage

Example


var emailDialog = Titanium.UI.createEmailDialog()
emailDialog.setSubject('foo');
emailDialog.setToRecipients(['fred@gmail.com', 'joe@hotmail.com']);
emailDialog.setCcRecipients(['joe@gmail.com']);
emailDialog.setBccRecipients(['obama@whitehouse.gov']);
emailDialog.setMessageBody('my body string');
emailDialog.addAttachment({mimeType:'image/jpeg', file:'path/to/image'});
emailDialog.open();

Note: all of these can be passed in as a JSON object to the contructor

API Arguments

subject : subject line for email

toRecipients : array of email address strings

ccRecipients : array of email address string

bccRecipients : array of email address string

messageBody : email message text

attachment : JSON object that includes 'mimeType' and 'file' which is the path to the attached file

Comments

  1. Blain Hamon 2011-04-15

    Update: Partially implemented save addAttachment of the format mentioned. Attachments of the imageBlob format (IE, what's gotten from the camera) is implemented, and fileBlobs will be implemented in the future.

    There is space for a callback or the results of the email composition: sent, cancelled, failed, saved.

JSON Source