This example shows how to send email using a device with WindowsPhone.
To try this example and must have a telephone system operating WindowsPhone8, alternatively you can try it with VisualStudio and the emulator WWGA512 mb, but without the ability to send email.
With WindowsPhone 7 and 8 and not only can send Email directly from the device, but also creating our application of any type, but with the need to send email to this Microsoft gives us the class EmailComposeTask. This class provides several properties to be implemented in its entirety in order to competare everything you need to successfully send the email. Let's see one by one and see their work, the Bcc property, this property gets or sets the recipients in the Bcc line of the e-mail, the Body property gets or sets the body of the e-mail, the property gets or Cc sets the recipients in the Cc line of the e-mail, the CodePage property gets or sets the character set that will be used to display the contents of the message, the Subject property gets or sets the subject of the e-mail and finally the properties to get or set the recipients in the To line of the e-mail. There are some methods that make up the class EmailComposeTask, we will focus on the Show () method, this method allows you to start the providers installed on the device such as Hotmail, but if there are more on our device providers will all be listed and the user can choose the one he wants to send the email. Place the following piece of code and minimum required in order to send an email.
public partial class MainPage
//Click event BtnsendClick
private void BtnsendClick(object sender, RoutedEventArgs e)
// Create a new instance of the class EmailComposeTask with which you can send email
var emailcomposer = new EmailComposeTask
// I enter the recipients to send the email using the To property of the class EmailComposeTask
To = string.Concat("mailto:",txtEmail.Text),
// Set the title of the property by Subject
Subject = "Email Sample",
// Enhanced the value of the Body property EmailComposeTask class, this is the content that will display the recipient
Body = txtEmail.Text,
// Start the email application on your device to send the Email
For more information please contact us at email@example.com