See Also: Attachment Members
The System.Net.Mail.Attachment class is used with the System.Net.Mail.MailMessage class. All messages include a MailMessage.Body, which contains the content of the message. In addition to the body, you might want to send additional files. These are sent as attachments and are represented as System.Net.Mail.Attachment instances. To add an attachment to a mail message, add it to the MailMessage.Attachments collection.
The MIME Content-Type header information for the attachment is represented by the AttachmentBase.ContentType property. The Content-Type header specifies the media type and subtype and any associated parameters. Use AttachmentBase.ContentType to get the instance associated with an attachment.
The MIME Content-Disposition header is represented by the Attachment.ContentDisposition property. The Content-Disposition header specifies the presentation and file time stamps for an attachment. A Content-Disposition header is sent only if the attachment is a file. Use the Attachment.ContentDisposition property to get the instance associated with an attachment.
The MIME Content-Transfer-Encoding header is represented by the AttachmentBase.TransferEncoding property.