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.

uses
Microsoft.Phone.Tasks;

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";
emailComposeTask.Show();

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

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...