Header was:
From example.user@t-online.de Wed Oct 09 10:21:57 2002
Return-path: <example.user@t-online.de>
Envelope-to: user@test.example.com Delivery-date: Wed, 09 Oct 2002 10:21:57 +0200 Received: ===hidden===
To: user@example.com
Subject: Re: Your mail
From: example.user@t-online.de
Date: Wed, 09 Oct 2002 10:23:52 +0200 (CEST)
Message-ID: <23758295.8767v7i6u675@webmail.t-online.de>
In-Reply-To: <E17yzpu-00060u-00@test>
References: <E17yzpu-00060u-00@test>
X-Mailer: T-Online WebMail 2.05
X-Complaints-To: abuse#webmail@t-online.com
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Sender: ===hidden===@t-dialin.net
Got it running by my self.
The first line was the problem.
my $firstline=1; while (<STDIN>) { if (!($firstline)) { push(@mail, $_); } $firstline=0; } $msg = Mail::Message->read(\@mail); $sender = $msg->sender; $replyto = Mail::Address->parse($msg->head->get('Reply-To')); if ($replyto) { $sender =$replyto; } $subject = $msg->subject; if($msg->isMultipart) { $summary = $msg->body->preamble; $summary .= "Number of attachments: ".scalar $msg->body->parts +('ACTIVE')."\n\n"; my $number =0; foreach my $part ($msg->body->parts) { $number++; $summary .= "======== Attachment ".$number." Type: ".$ +part->get('Content-Type')." =========\n"; # Attachment handling if ($part->get('Content-Type') eq "text/plain" ) { $summary .= $part->decoded."\n"; } $summary .= "========================================= +=================\n\n"; } $summary .= $msg->body->epilogue; } else { $summary = $msg->decoded; } $summary.="\nMail from: ".$sender->format();

In reply to Re: Re: Parse a Mail by Spida
in thread Parse a Mail by Spida

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.