Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : wrong hour when sending an e-mail

www.cryer.info
Managed Newsgroup Archive

wrong hour when sending an e-mail

Subject:wrong hour when sending an e-mail
Posted by:"Guillem" (guillemvicens-nospam@clubgreenoasis.com)
Date:22 Aug 2006 07:49:30

Hi,

using Indy 10.1.5 ( not the latest dev snapshot)

I am working on a simple app where I need to send an email with a
TidSMTP at a point. The e-mail is AFAICT well-formed except for one
detail: when created it somehow uses the local time as GMT time, thus
appearing as sent 2 hours later than in reality. I'm in the GMT+1 zone,
now +2 hours during summer time.

IIRC I hadn't this problem the last time I used TidSMTP, although it
was with a former version, not 10.1.5.

This is my code to create the message:

    mensaje := TidMessage.Create;
    mensaje.From.Address := WEmail;
    mensaje.From.Name := WNombre;
    mensaje.Subject := Asunto;
    mensaje.Recipients.Add.Address := Destinatario;
    mensaje.Body.Text := '';
    //añadimos la parte de texto
    TextoMensaje := TidText.Create(mensaje.MessageParts);
    TextoMensaje.Body.AddStrings(Texto);
    TextoMensaje.ContentType := 'text/html';

For the moment it is only HTML, no plain text part. I know that in this
case I could simply put it into the Body section of the TidMessage but
it is my  intention to allow multipart in the future and this is for
testing. OTOH I do not think it has anything to do with my issue.

Any ideas? Am I missing anything?
--
Best regards :)

Guillem Vicens Meier
Dep. Informática Green Service S.A.
www.clubgreenoasis.com

Replies:

www.cryer.info
Managed Newsgroup Archive