c# - 附件未出现在 Outlook 2016 中

标签 c# email windows-10 win-universal-app outlook-2016

我使用 Windows.ApplicationModel.Email.EmailMessage 创建了一封电子邮件,并使用以下代码向其添加了一个附件:

var stream = RandomAccessStreamReference.CreateFromFile(file);
var attachment = new EmailAttachment(file.Name, stream);
emailMessage.Attachments.Add(attachment);
await EmailManager.ShowComposeNewEmailAsync(emailMessage);

在 Windows 10 上的默认邮件客户端中,附件显示为附件。但是,附件根本不会出现在具有相同代码的 Outlook 2016 中。有什么解决方法的建议吗?

编辑:显然这是 Windows 10 和所有电子邮件客户端的问题,根据 this 标准 Windows 10 邮件客户端除外。 .

最佳答案

与此同时 docs也提到了它:

Attachments that you add to an email by using the EmailAttachment class will appear only in the Mail app. If users have any other mail program configured as their default mail program, the compose window will appear without the attachment. This is a known issue.

到今天似乎什么都没有改变。

关于c# - 附件未出现在 Outlook 2016 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35629586/

相关文章:

c# - 在应用程序设置中保存当前日期时间

php类内联css样式?

AllUsers 的 C# Windows10 启动快捷方式(通过 InstallShield 或 Coding)

c# - 将包含数组的对象显式转换为数组

c# - 动态构建 IQueryable OR 语句

c# - WindowsAzure.Storage,版本=9.3.0.0 - 异常无法加载文件或程序集

vba - Excel VBA : Sent Outlook email does not include pasted Range

php - 使用PHP邮件功能发送电子邮件,邮件服务器的配置

windows-10 - apache-drill-1.12.0 "Failure in starting embedded Drillbit"和 "no current connection error"(Windows 10)

从 Windows 10 到 Windows 10 端口 22 的 SSH 超时和密码问题