Message Object : Content Property |
Visual Basic |
---|
Public Property Content( _ Optional ByVal Segment As SegmentConstants = msgMessage, _ Optional ByVal ReturnType As ReturnTypeConstants = msgString _ ) As Variant |
Value | Description |
---|---|
msgHeader | Perform the operation on the header of the message. |
msgMessage | Perform the operation on the complete message. |
Value | Description |
---|---|
msgByteArray | Return the value as a Byte array. |
msgString | Return the value as a String. |
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.
This method may generate the following error code (refer to MailErrorConstants for a complete list of error codes):