Indy 10, TIdSmtp and date/time



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!



.



Relevant Pages

  • Re: Email Sending - How To
    ... Indy? ... you can use TidSMTP and TidMessage: ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: How to filter out some HTML?
    ... I did some poking around, and with Indy you can use TIdMessage to do ... .MessageParts for a .ContentType of 'text/html'. ...
    (borland.public.delphi.language.objectpascal)
  • Re: Indy 10, TIdSmtp and date/time
    ... My program uses a TIdMessage and TIdSmtp component to send messages to ... But after upgrading to Indy 10 the time of the email ... I'm not 100% sure Indy 10 causes this problem, but I cannot make up anything ... What is your local UDT time offset? ...
    (comp.lang.pascal.delphi.misc)
  • Re: SMTP client component that supports Authentication
    ... With authentication. ... > I'm currently using the Indy 9.0.18 TidSMTP component but I'm having an ... > intermittent problem with it that I have not been able to solve. ...
    (borland.public.delphi.thirdpartytools.general)
  • REQ: SMTP client component that supports Authentication
    ... I'm currently using the Indy 9.0.18 TidSMTP component but I'm having an intermittent problem with it that I have not been able to solve. ... Using BCBv5 ...
    (borland.public.delphi.thirdpartytools.general)