How to send email from your Windows Phone 8.1 app

As part of the API changes made in the new Windows Phone 8.1 XAML programming model, the EmailComposeTask – and several other tasks – that were available in the Microsoft.Phone.Tasks namespace in Windows Phone 8 are no longer available.

Most of these have been replaced with a new way of performing the same tasks. For sending an email from within your app, the old way in Windows Phone 8 was as follows:


EmailComposeTask emailComposeTask = new EmailComposeTask();
emailComposeTask.Subject = “Subject”;
emailComposeTask.To = “”;

The new way in Windows Phone 8.1 to send an email from your app is as follows:
// Define Recipient
EmailRecipient sendTo = new EmailRecipient()
    Name = “Name of Recepient”,
    Address = “”
// Create email object
EmailMessage mail = new EmailMessage();
mail.Subject = “this is the Subject”;
mail.Body = “this is the Body”;
// Add recipients to the mail object
// Open the share contract with Mail only:
await EmailManager.ShowComposeNewEmailAsync(mail);
Have fun,
Paras Wadehra
Microsoft MVP – Windows Platform Development
My WP Apps
Comments (3)

  1. Amol says:

    it gives the following error

    Error 1 The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'. c:usersamoldocumentsvisual studio 2013projectsapp5app5aboutus.xaml.cs 139 1 App5

  2. Dinesh says:

    Thankyou. It was very helpful.

  3. Amol, that is correct, you simply need to wrap the code provided in a method marked as async.