Topic Path: Symbol Reference > Classes > TIdMessageClient Class > TIdMessageClient Methods > SendMsg Method
TIdMessageClient.SendMsg Method

Sends message headers and body content on the client connection.

procedure SendMsg(
    AMsg: TIdMessage; 
    AHeadersOnly: Boolean = False
); virtual; overload;
Message to be sent by the client.
Client will write only headers. Default value is False. 

SendMsg is a virtual procedure in TIdMessageClient that performs the processing required to send the RFC 2822-compliant message headers and optional message parts from the message specified in AMsg using the message client. 

SendMsg writes the RFC 2822-compliant message headers in AMsg. When AHeaderOnly is False, SendMsg also sends the contents of the message body or message parts. 

When the message instance in AMsg indicates that encoding is not required (it has already been encoded using another method) values in the headers and optional body or message parts are written directly to the IOHandler. Otherwise all values in the message are encoded using the content encoding, transfer encoding, and character set indicated in the message instance. 

Descendant classes may override the default SendMsg behavior to implement protocol specific message transmission requirements.

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