In one of my previous post , i wrote about how one can send SMS in Windows Phone 7 using c# . This blog post focusses on sending a email in windows phone 7 using c#
Similar to sending SMS , sending email can be achieved with the EmailComposeTask
To use the EmailComposeTask , you must include the namespace Microsoft.Phone.Tasks .
Using Microsoft.Phone.Tasks ;
To , Subject and Body of the Email .
private void button1_Click(object sender, RoutedEventArgs e)
{
EmailComposeTask emailcomposer = new EmailComposeTask();
emailcomposer.To = "test@ginktage.com";
emailcomposer.Subject = "subject from test app";
emailcomposer.Body = "This is a test mail from Email Composer";
emailcomposer.Show();
}
When the Show method is called , the EmailComposer is opened which lets the user to click the send button to send the email
Note that you might the following message when email account is not set up in your windows phone 7 .



3 comments
How to send email in Windows Phone 7 using c | ProgramInDotnet
[...] How to send email in Windows Phone 7 using c. [...]
Aug 1, 2011
Nick Heiner
You can actually be a bit more concise making the `EmailComposeTask`:
Aug 9, 2011
Mike
thanks for this this is about the only thing i’ve done in wp7 that was easy – worked on the first try, thanks!
Nov 29, 2011