[TIMOB-25] Titanium.UI.createEmailDialog
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:50:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 0.6.0 |
Components | iOS |
Labels | n/a |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:22:40.000+0000 |
Updated | 2011-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
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.