LinkedResource.SetContent Method
Namespace: Rebex.Mail
Assembly: Rebex.Mail.dll (version 7.0.9083)
SetContent(Stream, String)
Sets the content of this resource to data read from the specified stream and sets media type.
Declaration
public void SetContent(Stream contentStream, string mediaType)
Parameters
Type | Name | Description |
---|---|---|
Stream | contentStream | Stream from which the data will be read. |
String | mediaType | Media type. |
SetContent(String)
Sets the content of this attachment to the specified text. Inherited from AttachmentBase.
Declaration
public void SetContent(string text)
Parameters
Type | Name | Description |
---|---|---|
String | text | Content to set. |
Remarks
Media type is set to 'text/plain'. Character set and transfer encoding are determined automatically.
SetContent(String, String)
Sets the content of this attachment to the specified text and media type. Inherited from AttachmentBase.
Declaration
public void SetContent(string text, string mediaType)
Parameters
Type | Name | Description |
---|---|---|
String | text | Content to set. |
String | mediaType | Media type. |
Remarks
Character set and transfer encoding are determined automatically.
SetContent(String, String, Encoding)
Sets the content of this attachment to the specified text, media type and character set. Inherited from AttachmentBase.
Declaration
public void SetContent(string text, string mediaType, Encoding charset)
Parameters
Type | Name | Description |
---|---|---|
String | text | Content to set. |
String | mediaType | Media type. |
Encoding | charset | Character set to use for encoding the text. |
Remarks
Transfer encoding is determined automatically.
SetContent(String, String, Encoding, TransferEncoding)
Sets the content of this attachment to the specified text, media type and character set. Inherited from AttachmentBase.
Declaration
public void SetContent(string text, string mediaType, Encoding charset, TransferEncoding transferEncoding)
Parameters
Type | Name | Description |
---|---|---|
String | text | Content to set. |
String | mediaType | Media type. |
Encoding | charset | Character set to use for encoding the text. |
TransferEncoding | transferEncoding | Transfer encoding. |