in reply to Receiving an email attachment

I ran the code that you posted but I can only get it to take a mime message and write a txt file with the same exact content. What am I doing wrong. I am pasting the test message below that I am passing it. It has text, html, and an attachment sent from netscape messenger. The function isn't recursing. $entity->parts always equals 0 Thanks for your help.

This is a multi-part message in MIME format.
--------------B8A046EFF7EDB5DE9549664F
Content-Type: multipart/alternative;
boundary="------------12FC523FDAD8D46FC3E99678"


--------------12FC523FDAD8D46FC3E99678
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

this is a test of the attachment functionality.



--
Thanks,
Kenny



--------------12FC523FDAD8D46FC3E99678
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
this is a test of the attachment functionality.
<br>
<br>
<pre>--
Thanks,
Kenny

</html>

--------------12FC523FDAD8D46FC3E99678--

--------------B8A046EFF7EDB5DE9549664F
Content-Type: application/x-gzip;
name="investing.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="investing.tar.gz"

H4sICDprSzsAA2ludmVzdGluZy50YXIA7dLBisIwEAbgXO1TzGEPekiZSWNjBR8mi6kURaWN
wr79puKW3YWiHkSE/7sMZH4mgUyzP4cuNvuNeh4W5rK0ihPn5E/tWS4Vu4KdOGf6czHWFor4
iW8anLroWyJ1/PIxbsdzt/pvSkRLqU36BdJk5vmlfpi8qmgaW78OVIcwy9hosX1MUnvOozGr
ufiJjU/LVnfJ4iH6HTWXFQ1r+gz1oQ00DFpSWqx0x/+cr2Nof8eokpwLuuaGRrecTGiRVy57
9S8AAAAAAAAAAAAAAAAAAAAAAAA87huu6CnZACgAAA==
--------------B8A046EFF7EDB5DE9549664F--

-- rogueFalcon

Why do you people insist on doing things sdrawkcab?

Replies are listed 'Best First'.
Re: Re: Receiving an email attachment
by perldoc (Scribe) on Jul 12, 2001 at 19:59 UTC
    You have to provide the entire message, including ALL the headers, not just the message body. MIME::Parser needs all of it. I got burned on this very badly myself the first time I tried to use MIME::Parser.
      Thank you! Thank you! Thank you!

      That was the ticket... You are now my hero :-)

      -- rogueFalcon

      Why do you people insist on doing things sdrawkcab?