A few Problems with the Mime Parts

Giganews Newsgroups
Subject: A few Problems with the Mime Parts
Posted by:  antitux.de (antitux@antitux.nospam.de)
Date: Fri, 25 Feb 2005

Hi there,

I have toe following Code:
--------------
    with TIdText.Create(email.MessageParts, nil) do begin
      ContentType := 'multipart/alternative';
      ParentPart := -1;
    end;
    with TIdText.Create(email.MessageParts, nil) do  begin
      Body.Text := mailbody.Text;
      CharSet := 'iso-8859-1';
      ContentTransfer := 'quoted-printable';
      ContentType := 'text/plain';
      ParentPart := 0;
    end;
    with TIdText.Create(email.MessageParts, nil) do
    begin
        Body.Text := mailbody.asansistring('html');
        CharSet := 'iso-8859-1';
        ContentTransfer := 'quoted-printable';
        ContentType := 'text/html';
        ParentPart := 0;
    end;
-----------------
The result eMail is:
------------------------------------------------------------------------------------------------------------------------------------
Received: from FDDEXCH01.net.finanzdesk.ag ([192.168.4.2]) by
mail.pohl-it.de with Microsoft SMTPSVC(5.0.2195.6713);
  Fri, 25 Feb 2005 18:19:49 +0100
Received: from p4p800deluxe ([192.168.0.11]) by FDDEXCH01.net.finanzdesk.ag
with Microsoft SMTPSVC(6.0.3790.211);
  Fri, 25 Feb 2005 18:19:48 +0100
From: "FinanzDesk Newsletter" <newslett…@finanzdesk.ag>
Subject: test Einzeiler
To: newslett…@finanzdesk.ag
Content-Type: multipart/alternative;
boundary="nKQM9=_Sff6h1yifc194eJ3Ni8cIdhQWgM"
MIME-Version: 1.0
Date: Fri, 25 Feb 2005 18:19:32 +0100
Return-Path: newslett…@finanzdesk.ag
Message-ID: <FDDEXCH01jMq9IcrMWU000001…@FDDEXCH01.net.finanzdesk.ag>
X-OriginalArrivalTime: 25 Feb 2005 17:19:48.0984 (UTC)
FILETIME=[35963780:01C51B5E]

Dieses ist ein Einzeiler

--nKQM9=_Sff6h1yifc194eJ3Ni8cIdhQWgM
Content-Type: multipart/alternative;
        boundary="nKQM9=_Sff6h1yifc194eJ3Ni8cIdhQWgMj"

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

Dieses ist ein Einzeiler

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

<html>
<head></head><body>
<div>Dieses ist ein Einzeiler</div>
<div>&nbsp;</div>
</body></html>

--nKQM9=_Sff6h1yifc194eJ3Ni8cIdhQWgMj--

--nKQM9=_Sff6h1yifc194eJ3Ni8cIdhQWgM--
--------------------------------------------------------------------------------------------------------------------------
But it should be:
------------------------------------------------------------------------------------------------------------------------------------
Received: from FDDEXCH01.net.finanzdesk.ag ([192.168.4.2]) by
mail.pohl-it.de with Microsoft SMTPSVC(5.0.2195.6713);
  Fri, 25 Feb 2005 18:19:49 +0100
Received: from p4p800deluxe ([192.168.0.11]) by FDDEXCH01.net.finanzdesk.ag
with Microsoft SMTPSVC(6.0.3790.211);
  Fri, 25 Feb 2005 18:19:48 +0100
From: "FinanzDesk Newsletter" <newslett…@finanzdesk.ag>
Subject: test Einzeiler
To: newslett…@finanzdesk.ag
Content-Type: multipart/alternative;
boundary="nKQM9=_Sff6h1yifc194eJ3Ni8cIdhQWgM"
MIME-Version: 1.0
Date: Fri, 25 Feb 2005 18:19:32 +0100
Return-Path: newslett…@finanzdesk.ag
Message-ID: <FDDEXCH01jMq9IcrMWU000001…@FDDEXCH01.net.finanzdesk.ag>
X-OriginalArrivalTime: 25 Feb 2005 17:19:48.0984 (UTC)
FILETIME=[35963780:01C51B5E]

Dieses ist ein Einzeiler

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

Dieses ist ein Einzeiler

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

<html>
<head></head><body>
<div>Dieses ist ein Einzeiler</div>
<div>&nbsp;</div>
</body></html>

--nKQM9=_Sff6h1yifc194eJ3Ni8cIdhQWgM--
------------------------------------------------------------------------------------------------------------------------------------
where is the mistake?

brgds

Antitux

Replies