Attachment not appearing in Outlook 2016

被刻印的时光 ゝ 提交于 2019-12-08 19:48:00

问题


I created an email with Windows.ApplicationModel.Email.EmailMessage and I added an Attachment to it with the code below:

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

In the default Mail client found on Windows 10, the attachment appears as an attachment. However the attachment does not appear at all in Outlook 2016 with the same code. Any suggestions how to fix this?

EDIT: So apparently this is an issue with Windows 10 and all email clients with the exception of the standard Windows 10 mail client according to this.


回答1:


In the meantime the docs are mentioning it too:

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.

Seems that nothing changed to this day.



来源:https://stackoverflow.com/questions/35629586/attachment-not-appearing-in-outlook-2016

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!