Attachment Constructor
Namespace: Rebex.Mail
Assembly: Rebex.Mail.dll (version 7.0.9083)
Attachment()
Initializes a new empty instance of a Attachment.
Declaration
public Attachment()
Attachment(MailMessage)
Initializes a new instance of a Attachment that represents an attached e-mail message.
Declaration
public Attachment(MailMessage message)
Parameters
Type | Name | Description |
---|---|---|
MailMessage | message | E-mail message to be used as an attachment. |
Attachment(String)
Initializes a new instance of a Attachment with the content of the specified file.
Declaration
public Attachment(string fileName)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the file to provide data for the attachment. |
Attachment(String, String)
Initializes a new instance of a Attachment with the content of the specified file and with a suggested name.
Declaration
public Attachment(string fileName, string name)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the file to provide data for the attachment. |
String | name | A suggested name of the attachment. |
Attachment(String, String, String)
Initializes a new instance of a Attachment with the content of the specified file and with a media type and suggested name.
Declaration
public Attachment(string fileName, string name, string mediaType)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the file to provide data for the attachment. |
String | name | A suggested name of the attachment. |
String | mediaType | A MIME media type of the file. |
Attachment(Stream, String)
Initializes a new instance of a Attachment with the content of the supplied stream and with suggested name.
Declaration
public Attachment(Stream contentStream, string name)
Parameters
Type | Name | Description |
---|---|---|
Stream | contentStream | Stream from which the data will be read. |
String | name | A suggested name of the attachment. |
Attachment(Stream, String, String)
Initializes a new instance of a Attachment with the content of the supplied stream and with a media type and suggested name.
Declaration
public Attachment(Stream contentStream, string name, string mediaType)
Parameters
Type | Name | Description |
---|---|---|
Stream | contentStream | Stream from which the data will be read. |
String | name | A suggested name of the attachment. |
String | mediaType | A MIME media type of the file. |
Attachment(Byte[], String)
Initializes a new instance of a Attachment with the content of the supplied byte array and with suggested name.
Declaration
public Attachment(byte[] content, string name)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | content | Byte array from which the data will be read. |
String | name | A suggested name of the attachment. |
Attachment(Byte[], String, String)
Initializes a new instance of a Attachment with the content of the supplied byte array and with a media type and suggested name.
Declaration
public Attachment(byte[] content, string name, string mediaType)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | content | Byte array from which the data will be read. |
String | name | A suggested name of the attachment. |
String | mediaType | A MIME media type of the file. |