Re: Received message corrupt with SMTPServer and Indy10

Giganews Newsgroups
Subject: Re: Received message corrupt with SMTPServer and Indy10
Posted by:  Pedro (pizquierdo20…@hotmail.com)
Date: Mon, 17 Jul 2006

Hi,

Sorry but I have been mistaken when comparing the files.

I believe that a line of another connection is mixed:

This Example show that is happening :

Original Mail:
=========

Header Mail
CR+LF
BodyLine1
BodyLine2
BodyLine3
BodyLine4
BodyLine5
....

Received Mail:
==========

Header Mail
CR+LF
BodyLine1
BodyLine2
BodyLineXXX <-- This line is new ¿?
BodyLine3
********      <-- BodyLine4 is missing
BodyLine5
...

Both messages, Original Mail and Received Mail have the same number of
lines.
The bodyLines are lines of 76 characters+#13+#10 in Base64 codification.

Please, any ideas?

Thanks
Pedro.

"Pedro" <pizquierdo20…@hotmail.com> escribió en el mensaje
news:C14A8E427200E340pizquierdo20…@hotmail.com...
> Hi,
>
> I have a SMTP server build with Indy10 (10.052) and Delphi 6.
>
> I know that it is an old versión of indy 10 but it's work fine and this is
a
> critical service and I only update with just reasons. By this service
great
> amount of information is sent.
>
> When I receive a message, save it to disk:
>
> procedure TSASMTP.OnMsgReceive(ASender: TIdSMTPServerContext; AMsg:
TStream;
> var LAction: TIdDataReply);
> var Instancia : TSAInstanciaSMTP;
>    NomFich : String;
> begin
>  try
>    LAction:=dTransactionFailed;
>    Instancia:=TSAInstanciaSMTP(ASender.Data);
>    If Instancia.Dest.Direccion='' then Raise
> ESAException.Create(rInvalidDest);
>
>    NomFich:=GetNomFileUnico(Instancia.DirTemp);
>    TMemoryStream(AMsg).SaveToFile(NomFich);
>    LAction:=dOK;
>  except
>    On E:Exception do OnInfo(tiError,Instancia.Id,E.Message+'
> TSASMTP.OnMsgReceive');
>  end;
> end;
>
> The emails that the server  receives have an attachment in Base64.
>
> But, in three occasions that I know, in the body of mail, there are two
> interchanged lines ¿?.
>
> Example:
>
> Original Mail:
> =========
>
> Header Mail
> CR+LF
> BodyLine1
> BodyLine2
> BodyLine3
> BodyLine4
> BodyLine5
> BodyLine6
> ....
>
> Received Mail:
> ==========
>
> Header Mail
> CR+LF
> BodyLine1
> BodyLine5  <--
> BodyLine3
> BodyLine4
> BodyLine2 <--
> BodyLine6
> ...
>
> Please, need help to solve this error.
>
> Thanks
> Pedro.

Replies

In response to

Received message corrupt with SMTPServer and Indy10 posted by Pedro on Mon, 17 Jul 2006