Re: Some questions about TidMessage

Giganews Newsgroups
Subject: Re: Some questions about TidMessage
Posted by:  Remy Lebeau (TeamB) (gambit…@yahoo.com)
Date: Fri, 4 Jul 2003

"Marcello Scala" <marcello.sca…@email.it> wrote in message
news:AA85A6747875E240marcello.sca…@email.it...

> 1.How can add/remove a X-Header to the TIdMessage?

TIdMessage has Headers and ExtraHeaders properties which are both
TStringList descendants.  When receiving a message, all entries are in the
Headers property only.  When sending a message, you can place your header in
either the Headers or ExtraHeaders property.

> 2.The correct use of  Date, GetUseNowForDate,
> SetUseNowForDate and UseNowForDate.

You don't need to concern yourself with GetUseNowForDate() and
SetUseNowForDate().  Those are just the internal getter/setter methods for
the UseNowForDate property.

As for using the UseNowForDate property, there is no "correct" use of it, it
is a matter of choice/design based on your actual needs at the time.  Set
UseNowForDate to true if you want the TIdMessage to automatically query the
machine's current date for use with the "Date" header when formatting the
message for transmission.  Set UseNowForDate to false if you want to assign
your own value to the Date property manually instead.

Gambit

Replies

In response to

Some questions about TidMessage posted by Marcello Scala on Tue, 1 Jul 2003