in reply to Perl to open embedded email?

I found some code which can get attached file and save it to somewhere. But that's not what I need

You can get attached email in the same way as you getting attached file, and then parse it as usual email message.

Replies are listed 'Best First'.
Re^2: Perl to open embedded email?
by maylin (Initiate) on Oct 07, 2009 at 20:21 UTC
    zwon: Thanks for your reply. But how to parse that embedded email. For example, in following code usiong Win32::OLE, it seems I can get that email first (1st line), but then it doesn't work when I try to get the email body. my $attach = $folder->Items->Item($i)->Attachments(); # this line works my $attachemailbody= $folder->Items->Item($i)->Attachments()->Body; # this line doesn't

      I didn't expect that you're using OLE. I'm a GNU/Linux user, so can't help you much with OLE, but perhaps you can get the message in some more digestible form and use something like Email::MIME to parse it. Can you show the output of:

      my $attach = $folder->Items->Item($i)->Attachments(); use Data::Dumper; warn Dumper $attach;