MimeMessage.SetContentFromFile Method
Namespace: Rebex.Mime
Assembly: Rebex.Mail.dll (version 7.0.9119)
SetContentFromFile(String, String, String, TransferEncoding)
Sets the content of this entity to data read from the specified file and sets media type, file name and transfer encoding. Inherited from MimeEntity.
Declaration
public void SetContentFromFile(string fileName, string name, string mediaType, TransferEncoding transferEncoding)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the file to read data from. |
String | name | File name to assign to the content, or null if no file name is to be assigned. |
String | mediaType | Media type. |
TransferEncoding | transferEncoding | Transfer encoding. |
SetContentFromFile(String, String, String)
Sets the content of this entity to data read from the specified file and sets media type and file name. Inherited from MimeEntity.
Declaration
public void SetContentFromFile(string fileName, string name, string mediaType)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the file to read data from. |
String | name | File name to assign to the content, or null if no file name is to be assigned. |
String | mediaType | Media type. |
SetContentFromFile(String, String)
Sets the content of this entity to data read from the specified file and sets file name. Inherited from MimeEntity.
Declaration
public void SetContentFromFile(string fileName, string name)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the file to read data from. |
String | name | File name to assign to the content, or null if no file name is to be assigned. |
Remarks
Media type is set to 'application/octet-stream'.
SetContentFromFile(String)
Sets the content of this entity to data read from the specified file. Inherited from MimeEntity.
Declaration
public void SetContentFromFile(string fileName)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the file to read data from. |
Remarks
File name is not set automatically. Set it manually using Name if needed. Media type is set to 'application/octet-stream'.