Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIdMessage - html content being damaged..
#1
This is a follow-on from my SMTP server thread but not directly a SMTP server issue - this is TIdMessage playing up.

I'm using Outlook express to send test emails to test@localhost.

OE is writing html email.

When the IdSMTPServer1MsgReceive event is triggered, I'm creating a TIdMessage and loading the AMsg stream into it. The problem is that the html content is then heavily damaged. When my server then forwards this via my VPS's smtp server, it's forwarded on as-is and reaches my yahoo account malformed.

If I send through another OE account that connects straight to my VPS's server (running Mercury32) then the email arrives at my yahoo account intact.

Saving the TIdMessage to a file has confirmed this behaviour is caused by TIdMessage. When I save the AMsg Stream to the database and then pull it out, the original email from Outlook Express is intact meaning that it's TIdMessage at fault for not reading the stream correctly.

This is my code:

Code:
procedure TDataModule1.IdSMTPServer1MsgReceive(
  ASender: TIdSMTPServerContext; AMsg: TStream; var VAction: TIdDataReply);
var
BlobStream: TStream;
I: Integer;
LAction : TIdRCPToReply;
Msg: TIdMessage;
ReplyObject: TReplyObject;
Results: TStringList;
SMTP: TIdSMTP;
UserID: Integer;

Count: Integer;
begin
//10
// When a message is received by the server, this event fires.
// The message data is made available in the AMsg : TStream.
// In this example, we will save it to a temporary file, and the load it using
// IdMessage and parse some header elements.

UserID := 0;

SMTP := TIdSMTP.Create;

Msg := TIdMessage.Create;
Msg.LoadFromStream(AMsg);

//Save to file to see how it's been parsed..
Msg.SaveToFile('zedmail.eml'); //zed makes windows explorer display at the bottom - easy to find
//Check MessageParts Count via the live debugger - point and hover.. (confirmed as 2 parts)
Count := Msg.MessageParts.Count;

Results := TStringList(ASender.Data);

//Look for internal recipients first - remove them from the RCPTList
//as the external relay server will throw an error
for I := ASender.RCPTList.Count -1 downto 0 do
   begin
   ReplyObject := TReplyObject(Results.Objects[Results.IndexOf(ASender.RCPTList.Items[I].Address)]);
   LAction := ReplyObject.Reply;

   case LAction of
      rAddressOk:
         begin
         Query1.Close;
         Query1.SQL.Text := SQL('FindUserIDByAddress');
         Query1.ParamByName('email').AsString := ASender.RCPTList.Items[I].Address;
         Query1.Open;

         with Query1 do
            begin
            First;

            while not EOF do
               begin
               UserID := FieldByName('user_id').AsInteger;

               Next;
               end;
            end;

         Query1.Close;

         Table1.TableName := 'mail';
         Table1.Open;

         Table1.Append;

         Table1.FieldByName('To_Address').AsString := ASender.RCPTList.Items[I].Address;
         Table1.FieldByName('From_Name').AsString := Msg.From.Name;
         Table1.FieldByName('From_Address').AsString := Msg.From.Address;
         Table1.FieldByName('Subject').AsString := Msg.Subject;
         Table1.FieldByName('Files').AsInteger := Msg.MessageParts.AttachmentCount;
         Table1.FieldByName('Size').AsInteger := AMsg.Size;
         Table1.FieldByName('User_Id').AsInteger := UserID;
         Table1.FieldByName('Received').AsDateTime := Now;//Received;

            //Save original AMsg stream to the database - it's original and that's good.
            try
            BlobStream := Table1.CreateBlobStream(Table1.FieldByName('Raw_Email'), bmWrite);
            //FileStream := TFileStream.Create(odBlob.FileName,fmOpenRead or fmShareDenyNone);
            AMsg.Position := 0;
            BlobStream.CopyFrom(AMsg, AMsg.Size);
            //FileStream.Free;
            BlobStream.Free;
            //tVenues.Post;
            finally
            Table1.Post;
            Table1.Close;
            end;

         Results.Delete(Results.IndexOf(ASender.RCPTList.Items[I].Address));
         ReplyObject.Free;
         ASender.RCPTList.Delete(I);
         end;
      end;
   end;

//Now RCPTList only has external email addresses - connect and forward.
for I := ASender.RCPTList.Count -1 downto 0 do
   begin
   ReplyObject := TReplyObject(Results.Objects[Results.IndexOf(ASender.RCPTList.Items[I].Address)]);
   LAction := ReplyObject.Reply;

   case LAction of
      rWillForward:
         begin
         SMTP.Host := 'myserver.com';
         SMTP.Port := 25;
         SMTP.Username := 'test';
         SMTP.Password := 'password';

            try
            SMTP.Connect;
            SMTP.Send(Msg, ASender.RCPTList);
            except

            end;

         SMTP.Disconnect;

         Results.Delete(Results.IndexOf(ASender.RCPTList.Items[I].Address));
         ReplyObject.Free;
         ASender.RCPTList.Delete(I);
         end;
      end;
   end;

VAction := dOk;
ASender.Data := nil;
Msg.Free;
Results.Free;
SMTP.Free;
end;

This is the original email from AMsg:

Code:
Message-ID: <04db01dadc83$466372c0$8a4ba8c0@Asuras>
From: "TEST User" <test@myserver.com>
To: <test@localhost>
Subject: test
Date: Mon, 22 Jul 2024 23:05:33 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="----=_NextPart_000_04D8_01DADC8B.A8069720"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180

This is a multi-part message in MIME format.

------=_NextPart_000_04D8_01DADC8B.A8069720
Content-Type: text/plain;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


This is a test message
------=_NextPart_000_04D8_01DADC8B.A8069720
Content-Type: text/html;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV>This is a test message</BODY></HTML>

------=_NextPart_000_04D8_01DADC8B.A8069720--


This is how TIdMessage leaves it after it is loaded in from AMsg

Code:
Message-ID: <04fe01dadce7$c2a3ed10$8a4ba8c0@Asuras>
From: "TEST User" <test@safrane.info>
To: test@localhost
Subject: test
Date: Tue, 23 Jul 2024 11:04:51 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="u1e2sBDEKRSzIuUEBLNYLDbvPORi2Mn=_A"
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
In-Reply-To: <04fe01dadce7$c2a3ed10$8a4ba8c0@Asuras>

This is a multi-part message in MIME format.

--u1e2sBDEKRSzIuUEBLNYLDbvPORi2Mn=_A
Content-Type: text/plain ; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

This is a test message

--u1e2sBDEKRSzIuUEBLNYLDbvPORi2Mn=_A
Content-Type: text/html ; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

message</BODY></HTML>

--u1e2sBDEKRSzIuUEBLNYLDbvPORi2Mn=_A--

.

If i use NoDecode := True; then it does make a little difference.. but still strips out a lot of html:

Code:
Received: from 10.217.130.17
by atlas310.free.mail.ne1.yahoo.com pod-id NONE with HTTPS; Tue, 23 Jul 2024 11:27:11 +0000
Return-Path: <test@myserver.com>
X-Originating-Ip: [84.93.230.235]
Received-SPF: pass (domain of myserver.com designates 1.1.1.1 as permitted sender)
Authentication-Results: atlas310.free.mail.ne1.yahoo.com;
dkim=unknown;
spf=pass smtp.mailfrom=myserver.com;
dmarc=unknown header.from=myserver.com;
X-Apparently-To: me@yahoo.com; Tue, 23 Jul 2024 11:27:11 +0000
X-YMailISG: n5r.Pi0WLDtDafQ7rJxkRKjLMd99sHGg5EdeoauWXaRliZBK
eHryI6bqS7nGYOeZj9gR7wfNw0HdGZfM.5PgvDwaHA_xHHdC8iR5D2pe6xPz
EPQ2.meXwca6LJq5JBDMfpTeR9yI6Yl6ZwsFKksVMN3ZdfyuqHip84738q8H
eH.U145J1FEsGrJO_SOaNq.QH.UgP1Sm9vZ6lSsZG70CdMXieVqCulJW7MTQ
qyvVyOvZNpZ8E2cfixDWqE2QhjwmaFF6RFvb9DuKjEir9JcLUDPX6TJYDOYJ
jBo7tGNh5lvijycb3CouKRugUlEIaFzF143SH8Jsp1e_pJmr6olTL2Rx4Ujc
SPDJPesjYcxR1LVVzGevfAYa4NPT5QdC4CPQ9DcVbo0DK5C.R7peqvLod6sI
ND6qaqfKujvVPcaXkMrnWJOcgkTyA41Y8SSY52bDRjMOFhXUsFPZAd.kOG5E
TJcuyY_XySdh9nmR_uYUAr4e2sBa2P1oRwm9MKknBwy6AtncAlriBq69PMtB
D82TWWU5kEmZJTXskGyXrLRbR3gIfrquYD7vt4dhk32Myndzj8n8hM0fSUjg
USbVBlCy8jDlhBFRJThBxwNvHQh2LnpvsdwmyhHEBRIR9IShZrsTNx8DeA7O
LSKPrcl3XYq7awCfTcEtNzZ76.RsgyK2kW.g1KlFYqir65puVAAX_skbSX2t
4MY9PA8n1hcPSxaruKP5FZ8mAdGGU6wCmZ5py1eD3wHKiGJfBR_mqwp2R5jx
xcH7PdXWQJ7nGv87vkfq67MMo4u8apDHFkSwWm4iGkCI0MWOGb5mfMlf0Cxq
EhDEg4gjEhv1dTFvlh4BT9gIEaP01tRxo0yaWHaTi1GlzucsKPbM9X1ZOeHh
GpfMRO7PYNrzia3YAnlMBDhh60LSbDhaS.bHSfnWkH2Rmm13ZnFbZjcZ.5rC
cfR5qRNdnp5DpReOLM2CNW0JqBLh1GBMi5pAbgS0MGGn1ixGV790WWW05.vg
7tNZ8KKhoxtg9vpWthADGRDCG7YDN7cBeS8ZmWm4pcBS90X83f5szAL4Qbxb
N7JKY3.WBSzjejGqU3qGyFhIdfpHzD3TGcQLgO3vFgH_XDjR4s.Y.tCTOumR
7mrLG2YUONPokNUD7v74pVjOwZ8BONmYMojDx7QFAkTVZUutmElKLi1HYo2c
M7_erB5gZ9jUXyJ5JJZElTgSRR16SgWssk7s1jhz_2aJJKOcbKv.5EsE.TPJ
iBklMxyao4IuVhR9_wk48f3h2wmw0rR.gtLv
Received: from 84.93.230.235 (EHLO myisp.net)
by 10.217.130.17 with SMTPs
(version=TLS1_2 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256);
Tue, 23 Jul 2024 11:27:11 +0000
Received: from myserver.com ([191.96.209.122])
    by smtp with ESMTPA
    id WDffsxHJAItnuWDfgsN3gZ; Tue, 23 Jul 2024 12:27:09 +0100
X-Clacks-Overhead: "GNU Terry Pratchett"
X-CM-Score: 0.00
X-CNFS-Analysis: v=2.4 cv=XMWTShhE c=1 sm=1 tr=0 ts=669f938d
a=HyS37gJifMNTHLq8jXbfCg==:117 a=HyS37gJifMNTHLq8jXbfCg==:17
a=MKtGQD3n3ToA:10 a=4kmOji7k6h8A:10 a=r77TgQKjGQsHNAKrUKIA:9
a=hEd9wg7epzSlDZCZp3cA:9 a=wPNLvfGTeEIA:10 a=QlPsXv4Xzdw7B_FWiFMA:9
a=iRAxY5Wokv9zikXpuOqg:22
X-AUTH: myisp:username@:2500
Received: from Spooler by myserver.com (Mercury/32 v4.72) ID MO000092;
  23 Jul 2024 12:27:09 +0100
Received: from spooler by myserver.com (Mercury/32 v4.72); 23 Jul 2024 12:27:03 +0100
Received: from Asuras (146.199.16.99) by myserver.com (Mercury/32 v4.72) with ESMTP ID MG000091;
   23 Jul 2024 12:26:53 +0100
Message-ID: <050701dadcf3$293a4820$8a4ba8c0@Asuras>
From: "TEST User" <test@myserver.com>
To: test@localhost, me@yahoo.com
Subject: test
Date: Tue, 23 Jul 2024 12:26:28 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="VV4ti8b=_J3TyFtEGw0D4gvwVydkKruEhu"
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
In-Reply-To: <050701dadcf3$293a4820$8a4ba8c0@Asuras>
X-CMAE-Envelope: MS4xfDZYVv3iL1pU90UO++bjKkWQGelyv2eytQOMwX/chPAW4PZWoLKdb0OggRMZDaHl2J2bNZF2lC52dBy4ZRd7W0GluqqMg07d1dVK8ckS7DkkPhqs8Xlq
V3EylxeqPy0cAtme44C/8pZhWrvj75/3Wo1L02uhHq2b3HxaxoHfPknHT5CjGv17TaIqiiW54GjSNA==
Content-Length: 424

This is a multi-part message in MIME format.

--VV4ti8b=_J3TyFtEGw0D4gvwVydkKruEhu
Content-Type: text/plain ; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

This is a test message

--VV4ti8b=_J3TyFtEGw0D4gvwVydkKruEhu
Content-Type: text/html ; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<DIV>&nbsp;</DIV>This is a test message</BODY></HTML>

--VV4ti8b=_J3TyFtEGw0D4gvwVydkKruEhu--

Now, I do have a confession to make, as in the opening post of my other thread i mentioned that I'm using an older version of V10. Was this a known bug back then or am I doing something wrong?

Is this still an issue in the latest version?

Alternatively, is there a way to send the AMsg stream itself so that IdMessage is only used internally to get addresses etc but SMTP sends the original version? - That would work for me.

Thanks,

JC
Reply
#2
(07-23-2024, 10:25 AM)Justin Case Wrote: When the IdSMTPServer1MsgReceive event is triggered, I'm creating a TIdMessage and loading the AMsg stream into it.

Let's stop right there for a moment.

Know that the TStream provided in the OnMsgReceive event is the raw email data sent by the client - MINUS any transparency escaping used to transmit the data over SMTP.  This is important to note, because the TIdMessage.LoadFrom...() methods require that escaping by default, as they are expecting to load emails that were saved by the TIdMessage.SaveTo...() methods, which apply escaping by default.

So, before looking at anything else, an extra step is needed to ensure that escaping is not an issue here.  In modern Indy, there is a class helper in the IdMessageHelper unit which adds an additional AUsesDotTransparency parameter to the TIdMessage.LoadFrom...() and TIdMessage.SaveTo...() methods to control the escaping behavior.

In this case, since the TStream data is not escaped, you need to call LoadFromStream() with this extra parameter set to False, eg:

Code:
uses
  ..., IdMessageHelper;

Msg := TIdMessage.Create;
Msg.LoadFromStream(AMsg, False, False);

If your version of Delphi does not support class helpers, there is a standalone TIdMessageHelper_LoadFromStream() function available, eg:

Code:
uses
  ..., IdMessageHelper;

Msg := TIdMessage.Create;
TIdMessageHelper_LoadFromStream(Msg, AMsg, False, False);

And if your version of Indy does not have the IdMessageHelper unit, well then you need to upgrade.

OK, now with that being said...

(07-23-2024, 10:25 AM)Justin Case Wrote: The problem is that the html content is then heavily damaged.

I am not able to reproduce that issue with the current version of Indy.  The HTML is preserved, as expected.

(07-23-2024, 10:25 AM)Justin Case Wrote: This is the original email from AMsg:
...
This is how TIdMessage leaves it after it is loaded in from AMsg
...

Aside from your HTML issue, and the usual expected dynamic header regenerations (Date, MIME boundary, etc), the only other changes I see in your example are:
  • the X-Priority header being dropped (because 3 means Normal, and TIdMessage.SaveTo...() does not output X-Priority for Normal)
  • the In-Reply-To header being added.  It should not be doing that, and the current version does not do that.

(07-23-2024, 10:25 AM)Justin Case Wrote: If i use NoDecode := True; then it does make a little difference..

For relaying purposes, I would recommend using both NoDecode=True and NoEncode=True. That way, the parsed email will preserve the original headers and message body as-is between load and save.  The downside is you would not be able to use the TIdMessage.MessageParts anymore, the raw content will be in the TIdMessage.Body only.

(07-23-2024, 10:25 AM)Justin Case Wrote: Now, I do have a confession to make, as in the opening post of my other thread i mentioned that I'm using an older version of V10. Was this a known bug back then or am I doing something wrong?

Looks like a bug, yes.

(07-23-2024, 10:25 AM)Justin Case Wrote: Is this still an issue in the latest version?

No.  I tested it using your example, and the HTML was preserved.

(07-23-2024, 10:25 AM)Justin Case Wrote: Alternatively, is there a way to send the AMsg stream itself so that IdMessage is only used internally to get addresses etc but SMTP sends the original version? - That would work for me.

TIdSMTP only natively supports sending a TMessage, not a TStream, which would be ideal in a relaying scenario. I'll consider adding it, I've opened a ticket for it:

#539 Update TIdSMTP and TIdSMTPRelay to support sending a TStream instead of a TIdMessage

If you want to send the TStream as-is, you will have to forgo using the TIdSMTP.Send() method and instead use the TIdSMTP.SendCmd() method to issue the SMTP MAIL FROM, RCPT TO, and DATA commands manually.

Otherwise, setting both TIdMessage.NoDecode and TIdMessage.NoEncode to True is the next best option.

Reply
#3
Remy, as always I appreciate your sheer brilliance, time and generosity.
Reply
#4
Remy, you are god of the programming universe.

It was a bit of a faff getting 10.6.3.3 installed (one of the reasons I dislike upgrading Indy) but once in, it just works with the code as-is.

Mail is now delivered and html is intact!

Just one slightly odd quirk, while it now displays perfectly in yahoo and makes it across multiple servers to get there, once looking at it in the yahoo mail list, yahoo displays an attachment icon - which it does not do for other html emails with both plain and html text. Here's a screeny:

[Image: screenshot-1617.jpg]


You can see the paperclips to the left of the time stamps.. but the two html emails underneath do not have this.

It's no biggie but i thought I'd mention it just in case there is another undiscovered bug somewhere. For the time being though, I'm pleased - thanks for your help!

Oh.. one other thing... thanks to you and Kudzu and others for putting the bpl files into a D6 folder - I was having a right old time of it trying to compile the various D6 packages which kept throwing up errors. As soon as i noticed the D6 folder I was sorted!
Reply
#5
(07-23-2024, 09:52 PM)Justin Case Wrote: Just one slightly odd quirk, while it now displays perfectly in yahoo and makes it across multiple servers to get there, once looking at it in the yahoo mail list, yahoo displays an attachment icon - which it does not do for other html emails with both plain and html text.

I would have to see the raw email data as seen by Yahoo. Offhand, what you have shown so far should not cause any email reader to think an attachment is present.

Reply
#6
(07-24-2024, 06:06 AM)rlebeau Wrote:
(07-23-2024, 09:52 PM)Justin Case Wrote: Just one slightly odd quirk, while it now displays perfectly in yahoo and makes it across multiple servers to get there, once looking at it in the yahoo mail list, yahoo displays an attachment icon - which it does not do for other html emails with both plain and html text.

I would have to see the raw email data as seen by Yahoo.  Offhand, what you have shown so far should not cause any email reader to think an attachment is present.

Well I've made a discovery...
I have two test accounts configured in outlook express which both send under the same domain but one sends via my local server which then connects to Mercury32 on my VPS. The other sends straight through Mercury32.

I've just sent the same exact email via both accounts. The one that connects to Mercury has no problems - yahoo shows no paperclip for attachments. The account that sends through my local Indy powered server does.

When I looked at the raw email (yahoo is handy for that at least) something jumped out at me straight away - content disposition is inline for the mail from my server.

This is from my Indy powered server:

Code:
Subject: test
Date: Thu, 25 Jul 2024 22:09:21 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="NtbHst4quINU52X8cLNqs7EIjOic=_sH6I"
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-CMAE-Envelope: MS4xfLlI2abP0lH2gt5cfVMeILBJCZsARPuuJqRok25HOpLnbtTDnyIKwergjgZVJvMYX5lU/IDpdkMPdgaIBZ8Thtra+cFWiGAasAuBiXbFguOFI2t945z/
nAtP9qPVyPrLoFqmSjrGe06q5SBGBvDUPbvkwEVHucqwLPg6/Ba3JT56Jp4wgjHARhjzxO1+H2Oi1Q==
Content-Length: 741

This is a multi-part message in MIME format.

--NtbHst4quINU52X8cLNqs7EIjOic=_sH6I
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline


This is a test message

--NtbHst4quINU52X8cLNqs7EIjOic=_sH6I
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-88=
59-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV>This is a test message</BODY></HTML>

--NtbHst4quINU52X8cLNqs7EIjOic=_sH6I--


This is what comes via Mercury32:
Code:
Subject: test
Date: Thu, 25 Jul 2024 22:07:06 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="----=_NextPart_000_054F_01DADEDE.FCDDEF00"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-CMAE-Envelope: MS4xfGWnjfNUAPxQA+GpHzGe5P6tnovzl2g0614758I4MIiWA4N9A/0uIu9t3hDwWmpBbGi2SRVIOv3ySkq25+w8iXSrcTeEM9vw75ZDJ14Jm/Zt7jqa4KFV
rSuBoWtLyOaLY2tB5WRbYW+dPTNRt+Xa68LHA+55pn6XYueDzN0unRObl2F39Ju3aiv0IJo524Q9hQ==
Content-Length: 707

This is a multi-part message in MIME format.

------=_NextPart_000_054F_01DADEDE.FCDDEF00
Content-Type: text/plain;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


This is a test message
------=_NextPart_000_054F_01DADEDE.FCDDEF00
Content-Type: text/html;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV>This is a test message</BODY></HTML>

------=_NextPart_000_054F_01DADEDE.FCDDEF00--


Obviously I'm not completely sure if it's the content disposition thing or something in the headers (I can send those for both emails by PM if you like? - a lot of sensitive stuff in them).
Reply
#7
Any thoughts?
Reply
#8
(07-30-2024, 06:19 AM)Justin Case Wrote: Any thoughts?

No, I don't, sorry.  All I can suggest is to use TIdMessage.NoDecode=True and TIdMessage.NoEncode=True to preserve as much of the original data as possible when using TIdMessage for relaying.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)