EmailAttachment 类

定义

表示电子邮件附件。

public ref class EmailAttachment sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Email.IEmailAttachmentFactory2, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Email.IEmailAttachmentFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class EmailAttachment final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Email.IEmailAttachmentFactory2, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Email.IEmailAttachmentFactory, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class EmailAttachment final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Email.IEmailAttachmentFactory2), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Email.IEmailAttachmentFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class EmailAttachment
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Email.IEmailAttachmentFactory2), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Email.IEmailAttachmentFactory), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class EmailAttachment
function EmailAttachment(fileName, data, mimeType)
Public NotInheritable Class EmailAttachment
继承
Object Platform::Object IInspectable EmailAttachment
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)
应用功能
email emailSystem

注解

使用 EmailAttachment 类添加到电子邮件的附件只会在邮件应用中显示。 如果用户将其他任何邮件程序配置为默认邮件程序,则将显示“撰写”窗口,且不含附件。 这是已知问题。

构造函数

EmailAttachment()

初始化 EmailAttachment 类的新实例。

EmailAttachment(String, IRandomAccessStreamReference)

使用指定的随机访问流初始化 EmailAttachment 类的新实例。

EmailAttachment(String, IRandomAccessStreamReference, String)

初始化 EmailAttachment 类的新实例。

属性

ContentId

获取或设置一个值,该值标识远程系统上附件的内容。

ContentLocation

获取或设置电子邮件附件的位置,作为统一资源标识符 (URI) 。

Data

获取或设置电子邮件附件的数据。

DownloadState

获取或设置电子邮件附件的下载状态。

EstimatedDownloadSizeInBytes

获取或设置附件的估计下载大小。

FileName

获取或设置电子邮件附件的显示文件名。

Id

获取电子邮件附件的本地唯一 ID。

IsFromBaseMessage

获取一个布尔值,该值指示附件是否来自基本消息。

IsInline

获取或设置一个布尔值属性,该属性指示附件是否包含在邮件正文中。

MimeType

获取或设置附件的 MIME 类型。

适用于

另请参阅