System.Net.Mail Namespace

System.Net.Mail 命名空間包含用來傳送電子郵件至 Simple Mail Transfer Protocol (SMTP) 傳遞用途之伺服器的類別。 The System.Net.Mail namespace contains classes used to send electronic mail to a Simple Mail Transfer Protocol (SMTP) server for delivery.

類別

AlternateView

表示要檢視電子郵件訊息的格式。Represents the format to view an email message.

AlternateViewCollection

表示 AlternateView 物件的集合。Represents a collection of AlternateView objects.

Attachment

表示電子郵件的附件。Represents an attachment to an email.

AttachmentBase

表示電子郵件附件的基底類別。Base class that represents an email attachment. AttachmentAlternateViewLinkedResource 類別都衍生自這個類別。Classes Attachment, AlternateView, and LinkedResource derive from this class.

AttachmentCollection

儲存作為電子郵件訊息之一部分傳送的附件。Stores attachments to be sent as part of an email message.

LinkedResource

表示電子郵件附件中的內嵌外部資源,例如 HTML 附件中的影像。Represents an embedded external resource in an email attachment, such as an image in an HTML attachment.

LinkedResourceCollection

儲存作為電子郵件訊息之一部分傳送的連結資源。Stores linked resources to be sent as part of an email message.

MailAddress

表示電子郵件寄件者或收件者的地址。Represents the address of an electronic mail sender or recipient.

MailAddressCollection

儲存與電子郵件訊息建立關聯的電子郵件地址。Store email addresses that are associated with an email message.

MailMessage

表示可以使用 SmtpClient 類別傳送的電子郵件訊息。Represents an email message that can be sent using the SmtpClient class.

SmtpClient

允許應用程式使用簡易郵件傳輸通訊協定 (SMTP) 傳送電子郵件。Allows applications to send email by using the Simple Mail Transfer Protocol (SMTP). SmtpClient 型別現在已淘汰。The SmtpClient type is now obsolete.

SmtpException

表示在 SmtpClient 無法完成 SendSendAsync 作業時擲回的例外狀況。Represents the exception that is thrown when the SmtpClient is not able to complete a Send or SendAsync operation.

SmtpFailedRecipientException

表示在 SmtpClient 無法完成對特定收件者之 SendSendAsync 作業時擲回的例外狀況。Represents the exception that is thrown when the SmtpClient is not able to complete a Send or SendAsync operation to a particular recipient.

SmtpFailedRecipientsException

例外狀況,在使用 SmtpClient 傳送電子郵件,且無法將電子郵件傳遞至所有收件者時擲回。The exception that is thrown when email is sent using an SmtpClient and cannot be delivered to all recipients.

SmtpPermission

控制 Simple Mail Transport Protocol (SMTP) 伺服器的存取。Controls access to Simple Mail Transport Protocol (SMTP) servers.

SmtpPermissionAttribute

控制 Simple Mail Transport Protocol (SMTP) 伺服器的存取。Controls access to Simple Mail Transport Protocol (SMTP) servers.

列舉

DeliveryNotificationOptions

描述電子郵件的傳遞通知選項。Describes the delivery notification options for email.

MailPriority

指定 MailMessage 的優先權。Specifies the priority of a MailMessage.

SmtpAccess

指定對 Simple Mail Transport Protocol (SMTP) 伺服器所允許的存取層級。Specifies the level of access allowed to a Simple Mail Transport Protocol (SMTP) server.

SmtpDeliveryFormat

要使用簡易郵件傳送通訊協定 (SMTP) 傳送外寄電子郵件所使用的傳送格式。The delivery format to use for sending outgoing email using the Simple Mail Transport Protocol (SMTP).

SmtpDeliveryMethod

指定電子郵件訊息的傳遞方式。Specifies how email messages are delivered.

SmtpStatusCode

指定使用 SmtpClient 類別傳送電子郵件的結果。Specifies the outcome of sending email by using the SmtpClient class.

委派

SendCompletedEventHandler

代表將處理 SendCompleted 事件的方法。Represents the method that will handle the SendCompleted event.

備註

MailMessage類別代表的電子郵件訊息的內容。The MailMessage class represents the content of a mail message. 您可以建立郵件附件使用Attachment類別。You can create mail attachments using the Attachment class.