Attachment.SetContentFromFile Method
Namespace: Rebex.Mail
Assembly: Rebex.Mail.dll (version 7.0.9119)
SetContentFromFile(String, String, String)
Sets the content of this attachment 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. |
String | mediaType | Media type. |
SetContentFromFile(String, String)
Sets the content of this attachment 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. |
SetContentFromFile(String)
Sets the content of this attachment 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 determined from the path. Media type is set to 'application/octet-stream'.