Message Object : Encode Method |
Visual Basic |
---|
Public Function Encode( _ ByVal Segment As Variant _ ) As Long |
Each use of this method generates another consecutive segment of the encoded message stream. Each segment can then be streamed by the SMTP Control (for example) for transmission.
Segment may be arbitrarily redimensioned as necessary. The value returned is the only indicator of the number of bytes encoded.
When the entire message is encoded, Segment returns a length of 0 indicating the end. The cycle of segments may be reset at any time by setting Segment to length 0; the next call to the Encode method returns the first segment.
The SMTP Control uses this method to encode and send all messages from its Message property.
This method may generate the following error code (refer to MailErrorConstants for a complete list of error codes):