Topic Path: Symbol Reference > Classes > TIdMessageEncoder Class > TIdMessageEncoder Methods > Encode Method > Encode Method (string, TIdStream)
ContentsIndexHome
PreviousUpNext
TIdMessageEncoder.Encode Method (string, TIdStream)

Constructs the encoded contents for an RFC 2822-compliant message part.

procedure Encode(
    const AFilename: string; 
    ADest: TIdStream
); overload;
Parameters 
Description 
AFilename 
File name used to retrieve the un-encoded contents of the message part.
 
ADest 
Stream where the encoder message part will be written. 

Encode is an overloded procedure in TIdMessageEncoder that retrieves the un-encoded values of an RFC 2822-compliant message part, and constructs the encoded contents of the message part. 

AFilename specifies the file name used to retrieve the un-encoded contents of the message part. 

ADest is a TIdStream descendant where the encoded message part will be written. 

The file-based variant of Encode reads the contents of the file specified in AFilename, and writes the encoded contents to the stream specified in ADest. This variant of Encode creates a temporary file stream for AFilename, and calls the abstract Encode method using the temporary file stream.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.