in reply to Re: receiving email message with an attachment.
in thread receiving email message with an attachment.

what I mean is : Where is the body with the actual message? How do i get access to that? regards.

  • Comment on Re^2: receiving email message with an attachment.

Replies are listed 'Best First'.
Re^3: receiving email message with an attachment.
by kennethk (Abbot) on Feb 27, 2013 at 20:56 UTC
    Which module are you using? Have you tried reading its documentation? My guess is that you are using MIME::Parser and for your particular case, the first part has no body because it's a multipart. Have you tried checking the MIME type of your entity? See MIME::Entity#bodyhandle.

    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Re^3: receiving email message with an attachment.
by ig (Vicar) on Feb 28, 2013 at 04:39 UTC

    Where the body is depends on how the message is composed. Can you post a small but complete example of a message you are having trouble parsing?

      I red somewhere that all mime entities consisted of a (mime::)head and a (mime::)body, but apparently its not(entirely) true. I'll try some more on my own. Thank you.

        You can read all about it in RFC2045 and related RFCs. Each part of a multipart message has both headers and body.