MimeEntity.SetContentFromFile Method
Namespace: Rebex.Mime
Assembly: Rebex.Mail.dll (version 7.0.9083)
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.
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.
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.
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.
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'.