共用方式為


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 類別新增至電子郵件的附件只會出現在 Mail 應用程式中。 如果使用者已將任何其他郵件程式設定為預設郵件程式,則撰寫視窗將會顯示,而不會顯示附件。 這是已知的問題。

建構函式

EmailAttachment()

初始化 EmailAttachment 類別的新實例。

EmailAttachment(String, IRandomAccessStreamReference)

使用指定的隨機存取資料流程,初始化 EmailAttachment 類別的新實例。

EmailAttachment(String, IRandomAccessStreamReference, String)

初始化 EmailAttachment 類別的新實例。

屬性

ContentId

取得或設定值,識別遠端系統上附件的內容。

ContentLocation

取得或設定電子郵件附件的位置,做為統一資源識別項 (URI) 。

Data

取得或設定電子郵件附件的資料。

DownloadState

取得或設定電子郵件附件的下載狀態。

EstimatedDownloadSizeInBytes

取得或設定附件的估計下載大小。

FileName

取得或設定電子郵件附件的顯示檔案名。

Id

取得電子郵件附件的本機唯一識別碼。

IsFromBaseMessage

取得布林值,指出附件是否來自基底訊息。

IsInline

取得或設定 Boolean 屬性,指出附件是否內嵌包含在郵件本文中。

MimeType

取得或設定附件的 MIME 類型。

適用於

另請參閱