我在 windows phone8 中使用EmailComposeTask创建了一个应用程序。它工作正常。但是在发送邮件的最后抛出异常。如下图。
我该如何解决这个问题以及为什么会出现这个问题?
请帮我。提前致谢。
这是我的代码。
private void saveEmailAddressTask_Completed(object sender, TaskEventArgs e)
{
if (e.TaskResult == TaskResult.OK)
{
MessageBox.Show("Email successfully Saved..");
}
}
private void emailAddressChooserTask_Completed(object sender, EmailResult e)
{
try
{
if (e.TaskResult == TaskResult.OK)
{
MessageBox.Show("Selected email :" + e.Email);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void mail_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
try
{
EmailComposeTask Myemail_Composetask = new EmailComposeTask();
Myemail_Composetask.Subject = "PhotoWrite Share";
Myemail_Composetask.Body = "Hi, I am sharing my PhotoWrite Photo, Hope you Like it.";
Myemail_Composetask.To = "";
Myemail_Composetask.Show();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}