Dart Smtp, Pop, Imap Controls
Content Property
Specifies either the header or the complete message.
Specifies the return value is a String or a Byte array.
Description
Read from this property to encode the message or write to this property to initialize the object.
Property type
Read-write property
Syntax
Visual Basic
Public Property Content( _
   Optional ByVal Segment As SegmentConstants = msgMessage, _
   Optional ByVal ReturnType As ReturnTypeConstants = msgString _
) As Variant
Parameters
Segment
ValueDescription
msgHeaderPerform the operation on the header of the message.
msgMessagePerform the operation on the complete message.
Specifies either the header or the complete message.
ReturnType
ValueDescription
msgByteArrayReturn the value as a Byte array.
msgStringReturn the value as a String.
Specifies the return value is a String or a Byte array.
Return Value
String or Byte array.
Remarks

The Message Object represents a message as properties and collections of properties. The header is comprised of the To, Cc, Bcc, and Header properties. These elements are formatted to produce the encoded header. The message text and attachments are stored in Part Objects and are managed by the PartList Object and Parts Collection.

When setting this property, the Segment and ReturnType parameters are ignored if provided. Setting this property causes a re-initialization of the object. By setting this property to "" (an empty string), the object is cleared of all content.

When reading this property, Segment defaults to msgMessage and ReturnType defaults to msgString. Alternative parameters can be used to return only the encoded header and/or a Byte array. The message is dynamically encoded when this property is read. When Segment is msgHeader, the returned value includes a trailing CRLFCRLF sequence so that a message body can be easily appended.

This property is commonly used to populate a Message Object or to get an encoded message that may be saved or sent to a mail server.

Error Codes

This method may generate the following error code (refer to MailErrorConstants for a complete list of error codes):

See Also

Message Object  | Message Members


PowerTCP SSL for ActiveX Documentation Version 2.2.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic