views:

41

answers:

1

How do you start the Mail app from a Titanium app?

I am looking for the equivalent of an HTML mailto: link where I can specify the email and maybe the subject from with in a windowView.

I am not using a webView.

Will

+1  A: 

Try this one:

var emailDialog = Titanium.UI.createEmailDialog();
emailDialog.subject = "Sending email from Titanium";
emailDialog.toRecipients = ['[email protected]'];
emailDialog.messageBody = 'Appcelerator Titanium - Testing sending email';

emailDialog.open();

But remember that you cannot test this send email feature from iPhone Simulator (because iPhone simulator lacks of setting email account). Try to check in real phone.

anticafe
you forgot the semi-colon on the first line.
William Macdonald
yes :p . I forgot this, but luckily you found and reminded me. Thanks.
anticafe