Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

Attachment.SetContent Method

Namespace: Rebex.Mail
Assembly: Rebex.Mail.dll (version 7.0.9147)

SetContent(Stream, String, String)

Sets the content of this attachment to data read from the specified stream and sets media type and file name.

Declaration
public void SetContent(Stream source, string name, string mediaType)
Parameters
Type Name Description
Stream source

Source stream to read data from.

String name

File name to assign to the content.

String mediaType

Media type.

SetContent(Stream, String)

Sets the content of this attachment to data read from the specified stream and sets file name.

Declaration
public void SetContent(Stream source, string name)
Parameters
Type Name Description
Stream source

Source stream to read data from.

String name

File name to assign to the content.

Remarks

Media type is set to 'application/octet-stream'.

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.

In This Article
  • SetContent(Stream, String, String)
  • SetContent(Stream, String)
  • SetContent(String)
  • SetContent(String, String)
  • SetContent(String, String, Encoding)
  • SetContent(String, String, Encoding, TransferEncoding)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies