Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Mar : indy 10 problem with wrong boundary value in EML message (when receive)
| Subject: | indy 10 problem with wrong boundary value in EML message (when receive) |
| Posted by: | "Marcelo" (mcgal-n-o-s-p-a-m-ig.com.br) |
| Date: | Wed, 7 Mar 2007 10:06:12 |
hi,
i'm in troubles, i cant solve this , please need help..
i'm using Delphi and indy 10,
i load a EML message and i send it,
but the problem is the wrong boundary when i receive the message in Outlook.
=====================
my load eml routine.
=====================
//editor is Trichedit
editor.Lines.LoadFromFile(OpenDialog1.FileName);
RawData := TMemoryStream.Create;
try
editor.Lines.SaveToStream(RawData);
RawData.Write(#10#13'.'#10#13, 5);
RawData.Seek(0, soFromBeginning);
IdMessage.NoDecode:=false;
IdMessage.loadFromStream(RawData);
finally
RawData.Free;
RawData:=nil;
end;
IdMessage.BccList.Clear;
idMessage.Recipients.Clear;
IdMessage.ReplyTo.Clear;
idMessage.Recipients.Add;
idMessage.Recipients.Items[0].Address := txtDest.lines[0];
idmessage.ExtraHeaders.add('Cc: "' + edfrom.text + '" <' + edReplyTo.text+ '>')
//i check the "messaparts" and i see all ok , the boundary values are matching.
//but after send the message i receive the message and the "first" boundary is wrong
for vk:=0 to idmessage.MessageParts.Count-1 do
begin
showmessage(idMessage.MessageParts.Items[vk].DisplayName+#13#10+
idMessage.MessageParts.Items[vk].Boundary);
end;
idSMTP.Connect;
idSMTP.Send(idMessage);
===========================================================================
the original message (loaded by eml routine)
===========================================================================
Date: Wed, 7 Mar 2007 9:36:25 -0300
MIME-Version: 1.0
Content-Type: multipart/related;
type="multipart/alternative";
boundary="----=_NextPart_000_0037_01C76028.5B95A2C0" <===good boundary!
X-Priority: 3
X-MSMail-Priority: Normal
X-Unsent: 1
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
This is a multi-part message in MIME format.
------=_NextPart_000_0037_01C76028.5B95A2C0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0038_01C76028.5B95A2C0" <======yes, match with the correct boundary!
------=_NextPart_001_0038_01C76028.5B95A2C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
------=_NextPart_001_0038_01C76028.5B95A2C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
=============================================================================
message receive in outlook express, the problem appears with the first wrong boundary value.. why?
=============================================================================
Content-Type: multipart/related; boundary="m1eWrVHZbqw=_iij98oDA701jQ8s5P9Hrm" <====crazy boundary
? WHY?
MIME-Version: 1.0
Status: O
boundary="----=_NextPart_000_0037_01C76028.5B95A2C0" <===THE FIRST BOUNDARY dont match with this
X-Priority: 3
X-MSMail-Priority: Normal
X-Unsent: 1
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
This is a multi-part message in MIME format.
------=_NextPart_000_0037_01C76028.5B95A2C0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0038_01C76028.5B95A2C0"
------=_NextPart_001_0038_01C76028.5B95A2C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
------=_NextPart_001_0038_01C76028.5B95A2C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
=======================================================================================