从 Windows Phone 8.1 发送电子邮件 [英] Send email from windows phone 8.1

查看:31
本文介绍了从 Windows Phone 8.1 发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 Windows Phone 8.1 应用程序发送一封电子邮件.电子邮件撰写任务在其中不起作用.我试过了

I want to sent an email from windows phone 8.1 app.Email Compose task not working in it. I tried this

EmailRecipient sendTo = new EmailRecipient()
{
    Address = "abc@outlook.com"
};

//generate mail object
EmailMessage mail = new EmailMessage();
mail.Subject = "Feedback";


//add recipients to the mail object
mail.To.Add(sendTo);
//mail.Bcc.Add(sendTo);
//mail.CC.Add(sendTo);

//open the share contract with Mail only:
await EmailManager.ShowComposeNewEmailAsync(mail);

这会在模拟器中出现错误:

This gives an error in the emulator:

无法分享
没有可共享的应用.

Can't share
There are no apps to share with.

推荐答案

您的模拟器中没有要从该帐户共享的任何电子邮件帐户.如果您想发送电子邮件,您应该有一个帐户对吗?

You don't have any Email accounts in your emulator to share from that account. If you want to send an email, you should have an account right?

因此转到设置"菜单中的电子邮件 + 帐户,然后在模拟器中添加任何类型的帐户.添加完电子邮件帐户后,尝试在模拟器中部署应用程序并执行任务.您现在应该可以看到电子邮件任务.

So go to email + accounts in Settings menu and add an account of any type in Emulator. Once you finish adding an email account, try deploying the app in the Emulator and perform the task. You should able to see Email task right now.

由于模拟器中没有电子邮件帐户,它显示没有要共享的应用程序,现在无法共享".

Since there is no email account in the emulator, "It shows no apps to share, Can't share now".

这篇关于从 Windows Phone 8.1 发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆