System
2.0.0.0
4.0.0.0
System.Net.Mail.AttachmentBase
The class is used with the class. All messages include a , 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 instances. To add an attachment to a mail message, add it to the collection.
Attachment content can be a , , or file name. You can specify the content in an attachment by using any of the constructors.
The MIME Content-Type header information for the attachment is represented by the property. The Content-Type header specifies the media type and subtype and any associated parameters. Use to get the instance associated with an attachment.
The MIME Content-Disposition header is represented by the 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 property to get the instance associated with an attachment.
The MIME Content-Transfer-Encoding header is represented by the property.
Represents an attachment to an e-mail.
Constructor
2.0.0.0
4.0.0.0
The properties are set as follows:
-
Property
Value
-
.
-
.
Initializes a new instance of the class with the specified content string.
A that contains a file path to use to create this attachment.
Constructor
2.0.0.0
4.0.0.0
The property is set to .
If the stream's property is false, the attachment and the that contains it are not reusable. You must supply a stream that can be searched to reuse an attachment.
Initializes a new instance of the class with the specified stream and content type.
A readable that contains the content for this attachment.
A that describes the data in .
Constructor
2.0.0.0
4.0.0.0
If is not null or equal to (""), the for this attachment is constructed with the property set to . The property is set to .
If the stream's property is false, the attachment and the that contains it are not reusable. You must supply a stream that can be searched in order to reuse an attachment.
Initializes a new instance of the class with the specified stream and name.
A readable that contains the content for this attachment.
A that contains the value for the property of the associated with this attachment. This value can be null.
Constructor
2.0.0.0
4.0.0.0
To be added.
Initializes a new instance of the class with the specified content string and .
A that contains a file path to use to create this attachment.
A that describes the data in .
Constructor
2.0.0.0
4.0.0.0
If is null or equal to (""), the property for this attachment is set to . If is not null and is not a zero-length string, it is used to construct the associated with this attachment.
Initializes a new instance of the class with the specified content string and MIME type information.
A that contains the content for this attachment.
A that contains the MIME Content-Header information for this attachment. This value can be null.
Constructor
2.0.0.0
4.0.0.0
If is not null or equal to (""), it is used to construct the class associated with this attachment.
If and both contain information, the value specified in is used. The property is set to .
If the stream's property is false, the attachment and the that contains it are not reusable. You must supply a stream that can be searched in order to reuse an attachment.
Initializes a new instance of the class with the specified stream, name, and MIME type information.
A readable that contains the content for this attachment.
A that contains the value for the property of the associated with this attachment. This value can be null.
A that contains the MIME Content-Header information for this attachment. This value can be null.
Property
2.0.0.0
4.0.0.0
System.Net.Mime.ContentDisposition
To be added.
The information in the class represents the MIME Content-Disposition header. This header is described in RFC 2183, available at http://www.ietf.org.
Gets the MIME content disposition for this attachment.
Method
2.0.0.0
4.0.0.0
System.Net.Mail.Attachment
To be added.
Creates a mail attachment using the content from the specified string, and the specified .
An object of type .
A that contains the content for this attachment.
A object that represents the Multipurpose Internet Mail Exchange (MIME) protocol Content-Type header to be used.
Method
2.0.0.0
4.0.0.0
System.Net.Mail.Attachment
If the content is in ASCII format then the character encoding is set to ASCII. For all other formats, the character encoding is set to utf-8. The default media type is plain text.
If the content is not in ASCII format and the encoding is null, utf-8 encoding is used.
Creates a mail attachment using the content from the specified string, and the specified MIME content type name.
An object of type .
A that contains the content for this attachment.
The MIME content type name value in the content type associated with this attachment.
Method
2.0.0.0
4.0.0.0
System.Net.Mail.Attachment
To be added.
Creates a mail attachment using the content from the specified string, the specified MIME content type name, character encoding, and MIME header information for the attachment.
An object of type .
A that contains the content for this attachment.
The MIME content type name value in the content type associated with this attachment.
An . This value can be null.
A that contains the MIME Content-Header information for this attachment. This value can be null.
Property
2.0.0.0
4.0.0.0
System.String
To be added.
The property is used in the Content-Type header generated for this attachment. The is displayed as the attachmentâs name when the email with the attachment is received. A grammar that details the syntax of the Content-Type header is described in RFC 2045 Section 5.1. RFC 2046 provides detailed information about MIME media types and their parameters. These RFCs are available at http://www.ietf.org.
Gets or sets the MIME content type name value in the content type associated with this attachment.
Property
2.0.0.0
4.0.0.0
System.Text.Encoding
To be added.
To be added.
Specifies the encoding for the .