Internet Direct (Indy)
Home
PreviousUpNext
TIdMessage.ExtraHeaders Property

Additional headers for the message.

Pascal
property ExtraHeaders: TIdHeaderList;

ExtraHeaders is a TIdHeaderList property used as a container for custom headers in the message. 

ExtraHeaders is used to store header values for the message that are not represented as properties of TIdMessage. ExtraHeaders is generally used to store values that might be added by a Mail User Agent, or for custom extension tokens beginning with "x-" as described in RFC 2822. 

Use the Methods and Properties in TIdHeaderList to maintain the custom message headers. For example: TIdHeaderList.Add, TIdHeaderList.Values, TIdHeaderList.AddStdValues

When a message is sent using a protocol transport provider, like TIdSMTP or TIdNNTP, values in ExtraHeaders are merged with values in the Header property during transmission. The same action is performed when calling the SaveToFile or SaveToStream methods. 

ExtraHeaders is not used for messages received using a protocol transport provider, or when using the the LoadFromFile and LoadFromStream methods. Use the Headers property to access message headers in a received (or loaded) message.

(Delphi) Adding a custom message header. 

 

IdMessage1.ExtraHeaders.Values['X-Newsreader'] := 'FooNews 1.0';
IdMessage1.ExtraHeaders.Add('X-Mailer: FooMail 1.0');
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.