tenny1204 has asked for the wisdom of the Perl Monks concerning the following question:
Hello all. I have a question. How can I access the actual message from an email with attachments. Normally I use something like:
$entity = $parser->parse_data($msg); $parts = $entity->parts; $part = $entity->parts(0); $body = $part->bodyhandle || die "no handle"; $IO=$body->open("r"); while(defined($_= $IO->getline)){print $_;}
But this fails when there's an attachment because then there is no bodyhandle. But i am able to read and show the data of the attachment($entity->parts(1)), just not the actual email message
Maybe one can explain. Best regards, Tenny.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: receiving email message with an attachment.
by Corion (Patriarch) on Feb 27, 2013 at 15:44 UTC | |
|
Re: receiving email message with an attachment.
by kennethk (Abbot) on Feb 27, 2013 at 15:55 UTC | |
by tenny1204 (Novice) on Feb 27, 2013 at 17:51 UTC | |
by kennethk (Abbot) on Feb 27, 2013 at 20:56 UTC | |
by ig (Vicar) on Feb 28, 2013 at 04:39 UTC | |
by tenny1204 (Novice) on Feb 28, 2013 at 06:50 UTC | |
by ig (Vicar) on Mar 04, 2013 at 17:45 UTC |