jumaris / indyproject

Automatically exported from code.google.com/p/indyproject
0 stars 0 forks source link

Extra MIME boundary after calling TIdMessage.LoadFromFile() then TIdMessage.SaveToFile() #232

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When loading the following email file from Outlook 11 using 
TIdMessage.LoadFromFile():

MIME-Version: 1.0
Content-Type: multipart/mixed;
   boundary="----=_NextPart_000_0000_01CD87A9.F39651B0"

------=_NextPart_000_0000_01CD87A9.F39651B0
Content-Type: multipart/alternative;
   boundary="----=_NextPart_001_0001_01CD87A9.F39651B0"

------=_NextPart_001_0001_01CD87A9.F39651B0
Content-Type: text/plain;
   charset="koi8-r"
Content-Transfer-Encoding: base64

------=_NextPart_001_0001_01CD87A9.F39651B0
Content-Type: text/html;
   charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

------=_NextPart_001_0001_01CD87A9.F39651B0--

------=_NextPart_000_0000_01CD87A9.F39651B0
Content-Type: application/octet-stream;
   name="=?koi8-r?B?0NLBytMucmFy?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
   filename="123.txt"

------=_NextPart_000_0000_01CD87A9.F39651B0--

The result of TIdMessage.MessageParts.Count is 4.

After saving the email using TIdMessage.SaveToFile(), the file looks like this:

MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="Iz2=_MrRsnqqWlmQBpaikmYewHfZI2SHu4"
Date: Fri, 31 Aug 2012 19:21:54 +0400

This is a multi-part message in MIME format

--Iz2=_MrRsnqqWlmQBpaikmYewHfZI2SHu4
Content-Type: multipart/alternative; 
boundary="----=_NextPart_001_0001_01CD87A9.F39651B0";
   boundary="P3P4JVPQnGPIfMWN=_ghvkOTcuXASfY54z"

--P3P4JVPQnGPIfMWN=_ghvkOTcuXASfY54z
Content-Type: text/plain; charset="koi8-r"
Content-Transfer-Encoding: base64
Content-Disposition: inline

--P3P4JVPQnGPIfMWN=_ghvkOTcuXASfY54z
Content-Type: text/html; charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

--P3P4JVPQnGPIfMWN=_ghvkOTcuXASfY54z--

--Iz2=_MrRsnqqWlmQBpaikmYewHfZI2SHu4
Content-Type: application/octet-stream;
   name="123.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
   filename="123.txt"

--Iz2=_MrRsnqqWlmQBpaikmYewHfZI2SHu4-- 

Notice the two boundary attributes of the first MIME part.

Original issue reported on code.google.com by gambit47 on 5 Sep 2012 at 7:28

Attachments: