[英]How to set-up or confirm email account to sent email from my send mail application in Windows Phone 7
How to set-up or confirm email account to sent email from my send mail application in Windows Phone 7 如何在Windows Phone 7中设置或确认电子邮件帐户以从我的发送邮件应用程序发送邮件
I created simple email sending application in Windows Phone 7 but when i click on Send button i got this message:- " Make sure you've set-up an account and try again
" 我在Windows Phone 7中创建了简单的电子邮件发送应用程序,但是当我单击“发送”按钮时,我收到以下消息:-“ Make sure you've set-up an account and try again
”
this is my application code: 这是我的应用程序代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;
namespace SendingMail
{
public partial class MainPage : PhoneApplicationPage
{
EmailAddressChooserTask emailAddresstask;
// Constructor
public MainPage()
{
InitializeComponent();
this.emailAddresstask = new EmailAddressChooserTask();
this.emailAddresstask.Completed += new EventHandler<EmailResult>(emailAddresstask_Completed);
}
#region Events
//Open Contact button click
private void btnOpenContact_Click(object sender, RoutedEventArgs e)
{
emailAddresstask.Show();
}
//Email Address Chooser Task Completed
private void emailAddresstask_Completed(object sender, EmailResult e)
{
if (e.TaskResult == TaskResult.OK)
{
txtTo.Text = e.Email;
}
}
//Send mail button click
private void btnMail_Click(object sender, RoutedEventArgs e)
{
EmailComposeTask Myemail_Composetask = new EmailComposeTask();
Myemail_Composetask.To = txtTo.Text;
Myemail_Composetask.Cc = txtCC.Text;
Myemail_Composetask.Subject = txtSbj.Text;
Myemail_Composetask.Body = txtbd.Text;
Myemail_Composetask.Show();
}
#endregion
}
}
You can't set up an email account in the Windows Phone 7 emulator. 您无法在Windows Phone 7模拟器中设置电子邮件帐户。 You'll need to test this on a Windows Phone 7 device, or else use the Windows Phone 8 SDK and the Windows Phone 8 emulator to test this scenario for your Windows Phone 7 app. 您需要在Windows Phone 7设备上对此进行测试,否则,请使用Windows Phone 8 SDK和Windows Phone 8模拟器为Windows Phone 7应用程序测试此方案。
From a device or the Windows Phone 8 emulator, go to Settings and select "email+accounts" and add the account. 在设备或Windows Phone 8模拟器上,转到“设置”,然后选择“电子邮件+帐户”并添加帐户。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.