Oxygene and WP8 – EmailComposeTask Launcher

Oxygene and Windows Phone 8 tutorials – Article Index

The EmailComposeTask launcher lets the user send email from your Windows Phone app. This launcher launches the Email Application and populates the Message subject, body and the “to” address as specified to the EmailComposeTask. When the user taps on the “Send” button in the Email Compose screen, the email is sent.

How to use the EmailComposeTask Launcher in Windows Phone 8 with Oxygene?

To use the EmailComposeTask launcher with Oxygene, follow the below steps.

1. Include the following namespace in the code behind file.


2. Create an instance of the EmailComposeTask and set the To , Body and the Subject property of the EmailComposeTask object and then call the Show method . This will launch the Email Application prepopulated with the data provided .

var emailComposeTask: EmailComposeTask := new EmailComposeTask();
emailComposeTask.To := "[email protected]";
emailComposeTask.Body := "Welcome to the developerpublish Oxygene and WP8 tutorial series";
emailComposeTask.Subject := "developerpublishWelcome Message";

Oxygene and WP8 - EmailComposeTask Launcher

Test the EmailComposeTask on the Windows Phone device. If an email account is not configured in the phone, the app prompts the user to setup an email account.

Download the sample source code on EmailComposeTask Launcher in Oxygene and WP8 here