PowerTCP Mail for .NET
Content Property (Textpart)




Sets or gets text content. Returns null if not initialized.
Syntax
Public Shadows Property Content As String
Dim instance As Textpart
Dim value As String
 
instance.Content = value
 
value = instance.Content
public new string Content {get; set;}
public: __property new string* get_Content();
public: __property new void set_Content( 
   string* value
);
public:
new property String^ Content {
   String^ get();
   void set (    String^ value);
}
Remarks

When set, if Encoding is ASCII and the new value contains a non-ASCII character, then Encoding is set to Headers.Encoding and Resource.TransferEncoding is set to TransferEncoding.QuotedPrintable. This default behavior can be overridden by setting these properties explicitly.

When read, if Encoding is ASCII and an 8-bit character is found, then the part body is searched for "charset=". If a valid charset is found then Encoding is updated and used for decoding, otherwise Encoding.Default is used. This behavior can be overridden by setting Encoding explicitly.

Content must be null when decoding (the encoding Stream is being written to), and not null when encoding (the encoding Stream is being read from).

See Also

Reference

Textpart Class
Textpart Members


PowerTCP Mail for .NET Documentation Version 4.3
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic