Indy 10, TIdSmtp and date/time
- From: Eric <testanonymous@xxxxxxxxxxx>
- Date: Sun, 07 May 2006 12:12:31 +0000
Hi,
My program uses a TIdMessage and TIdSmtp component to send messages to
mail2news gateways. I developed the program using Indy 9 (initially) and
everything worked fine. But after upgrading to Indy 10 the time of the email
message isn't displayed correctly anymore. It's 2 hours ahead in time
I'm not 100% sure Indy 10 causes this problem, but I cannot make up anything
else, 'cause I haven't made any major changes to the program and the
compiled version using Indy 9 does *not* have this problem.
So the question is if I should set a property of TIdMessage and/or TIdSmtp
in order to correct this problem (if not, what else could be causing this
problem? )
Here's a snippet of the code:
IdMessageMail2News := TIdMessage.Create(nil); <= is created dynamically
try
repeat
ClientNNTPLine := ClientConn.ReadLn;
if BodyFollows then begin
if ClientNNTPLine <> '.' then
IdMessageMail2News.Body.Add(ClientNNTPLine)
end
else
if ClientNNTPLine = '' then
BodyFollows := true
else
IdMessageMail2News.AddHeader(ClientNNTPLine);
LogMessage('ClientNNTPLine (Post) ='+ ClientNNTPLine);
until ClientNNTPLine = '.';
IdMessageMail2News.ProcessHeaders;
IdMessageMail2News.Recipients[0].Address := 'mail2news@xxxxxxxxx';
Send2Mail2News(AThread, IdMessageMail2News);
finally
IdMessageMail2News.Free;
end;
procedure TFormMain.Send2Mail2News(AThread: TIdContext; aIdMessageMail2News:
TIdMessage);
begin
TMyNNTPThread(AThread).Mail2News.Connect;
try
TMyNNTPThread(AThread).Mail2News.Send(aIdMessageMail2News);
finally
TMyNNTPThread(AThread).Mail2News.Disconnect;
end;
LogMessage('Send to Mail2News gateway without Indy error');
end;
BTW, the regional settings and date/time of my PC are correct!
Thanks a lot!
P.S. This message has been posted with this program!
.
- Follow-Ups:
- Re: Indy 10, TIdSmtp and date/time
- From: J French
- Indy 10, TIdSmtp and date/time
- From: Eric
- Re: Indy 10, TIdSmtp and date/time
- References:
- Indy 10, TIdSmtp and date/time
- From: Eric
- Indy 10, TIdSmtp and date/time
- Prev by Date: Re: Clientsocket
- Next by Date: Re: Indy 10, TIdSmtp and date/time
- Previous by thread: Save and Load Set Values
- Next by thread: Re: Clientsocket
- Index(es):
Relevant Pages
|