Question

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

Was it helpful?

Solution

Try this one:

var emailDialog = Titanium.UI.createEmailDialog();
emailDialog.subject = "Sending email from Titanium";
emailDialog.toRecipients = ['name@gmail.com'];
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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top