Learning Windows Phone7 development together (14th. 2 Email Task)

Source: Internet
Author: User
Tags email account

1. Email Task: You can call the system Email program to send emails.

Before sending the email, you need to set up an email account to send the email. However, the full version is not set. It seems that the email cannot be sent on the simulator, so you can save the settings. This Task can be used only on a real machine.

EmailComposeTask email = new EmailComposeTask ();

Email. Body = "test my email by wp7 emulator ";

Email. Subject = "test ";

Email. To = "aa@hotmail.com ";

Emai. Cc = bb@hotmail.com ";

Email. Show ();

 

 

2. Email Address chooser Task: used to open the contact program and select the contact Email address.

This Task can be selected only when the contact and email address are added. However, this program is not available in the official simulator, and you cannot add contacts through this program, therefore, if you want to use this Task without a real machine, you need a full simulator. At present, the foreign cool man has cracked the Beta version of the simulator and can get the full version. I mentioned a cracked version of the image file before, but it can only be viewed, and now the new full version can be debugged. The following is done through the full version of the simulator.

Contact created on the simulator:

 

Start and select contacts:

EmailAddressChooserTask chooser = new EmailAddressChooserTask ();

Chooser. Completed + = new EventHandler <EmailResult> (chooser_Completed );

Chooser. Show ();

Void chooser_Completed (object sender, EmailResult e)

{

E. Email // obtain the Email address of the selected contact here

}

 

3. Save Email Address Task: You can call the contact program and Save the set Email address to the selected contact or create a contact.

SaveEmailAddressTask SaveAddr = new SaveEmailAddressTask ();

SaveAddr. Email = "cc.hotmail.com ";

SaveAddr. Completed + = new EventHandler <TaskEventArgs> (SaveAddr_Completed );

SaveAddr. Show ();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.