Thanks for the tipe on the parts/parts_DFS procedures. Unfortunately they havn't gotten me anywhere. The mail message I'm dealing with has the following structure:
X-POP3-Rcpt: hidden@hidden.org Received: from hidden (hidden [111.111.111.111]) by hidden.org (8.10.2/8.10.2) with ESMTP id g441dFH07987; Fri, 3 May 2002 21:39:15 -0400 From: "Hidden" <hidden@hidden.org> To: <hidden@hidden.org> Cc: <hidden@hidden.org> Subject: Hidden Date: Fri, 3 May 2002 20:52:30 -0500 Message-ID: <000801c1f30e$5aaccb90$0c0210ac@hidden.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0009_01C1F2E4.71D6C390" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C1F2E4.71D6C390 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit # message here ------=_NextPart_000_0009_01C1F2E4.71D6C390 Content-Type: application/msword; name="File.DOC" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="File.DOC" # encoded datafile here ------=_NextPart_000_0009_01C1F2E4.71D6C390--
The message is stored in an array and is obtained using the following code. The array is then fed into the parser entity parse_data():
use Mail::POP3Client; use MIME::Parser; $pop = new Mail::POP3Client( USER => "hidden", PASSWORD=> "hidden", HOST => "hidden" ); @message = ($pop->Head(1),"\n",$pop->Body(1)); my $parser = new MIME::Parser; $entity = $parser->parse_data(\@message);
I then try and do anything with that entity and I get nothing. The code creates a .txt file in the run directory with a size of 0.
Any ideas what I'm doing wrong?
Thanks!

In reply to Re: Re: Using MIME::Tools to save attachments by Lanthade
in thread Using MIME::Tools to save attachments by Lanthade

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.