Take the 2-minute tour ×

I've tried to send email in a Windows Store App by using following code:

await Windows.System.Launcher.LaunchUriAsync(mailto);

It was not showing any Errors but I didn't receive any emails. What was wrong from above code?

share|improve this question
Did it not open the Mail app, or did you not receive the mail you sent? –  CodeCaster Jan 1 '13 at 13:17
Not receiving any mails –  Lokesh Jan 1 '13 at 13:25
So you did get the Mail app and you did send an email? –  CodeCaster Jan 1 '13 at 16:32

2 Answers 2

up vote 0 down vote accepted

Your code should open the default mail client (i.e. the default application for handling mailto: protocol) with all the information in the link. If it doesn't, you probably don't have the default application set up correctly. This happened to me at first, before I select the Mail application to handle this protocol.

Still, you probably don't want such an experience for your user for at least two reasons:

  • Your code depends on how the user machine is configured. You can't be sure what will happen when it gets executed.
  • Even if Mail is the default app, your code will only create a new draft and the user will have to send it himself.

Depending on what you want to achieve, I'd consider one of the following approaches:

  • As Azzy already suggested, for sending emails interactively, sharing is the right approach in Windows Store apps.
  • If you want emails to be sent non-interactively, you should create a web service and send email from there when you app calls it.
share|improve this answer

The correct way would be to use Sharing. Your app should create an HTML document or Text and share it. The user would select Mail from the Share charm and the HTML/Text would become the body of the email.

See here for more info...


share|improve this answer
Thank you for reply, I want to send a mail with subject and body.. How can I do that without using HTML document?? –  Lokesh Jan 1 '13 at 12:59
your posted link explains the sharing of data..not about sending Email .. –  Lokesh Jan 1 '13 at 13:04

Your Answer


