Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Perl to read EMBEDDED Outlook email?

Reply
Thread Tools

Perl to read EMBEDDED Outlook email?

 
 
maylin
Guest
Posts: n/a
 
      10-29-2009
Hope some experts can help me on this -

If you have an Outlook email that includes an attached email, how can
you use Perl to read/parse that embedded email? I tried to use
WIN32::OLE, and I know you can get the mail body this way:
$mailbody=$folder->Items->Item($i)->Body;

Now this email also has an attached email and I need to get its mail
body. So I used following line to get the attached email:
my $attach = $folder->Items->Item($i)->Attachments();

After this line runs the $attach is that embedded email (and I can
save the $attach to a text file), but how to open it to get its email
body?

I tried following but none of them worked:

$mailbody=$attach->Body; # not working
$mailbody=$attach->Items->Item(1)->Body; # not working
$mailbody = $folder->Items->Item($i)->Attachments()->Body; # not
working

It'll be highly appreciated if somebody tells me where is wrong or
where to find some sample codes.
 
Reply With Quote
 
 
 
 
Peter J. Holzer
Guest
Posts: n/a
 
      10-31-2009
On 2009-10-29 20:41, maylin <(E-Mail Removed)> wrote:
> Hope some experts can help me on this -
>
> If you have an Outlook email that includes an attached email, how can
> you use Perl to read/parse that embedded email? I tried to use
> WIN32::OLE, and I know you can get the mail body this way:
> $mailbody=$folder->Items->Item($i)->Body;


Can you get at the complete rfc5322-conforming text of the email?
If you can, simply parse it with MIME:arser and extract the parts you
need from the MIME::Entity object it returns.

hp
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded <divs> with events: How to prevent the parent div's eventfrom being fired when the embedded div's event is fired? Num GG Javascript 2 11-17-2008 08:56 PM
Embedded vs. Non-embedded Tests Trans Ruby 11 09-05-2007 11:22 AM
Embedded languages based on early Ada (from "Re: Preferred OS, processor family for running embedded Ada?") Colin Paul Gloster VHDL 48 04-10-2007 10:31 AM
How to display images embedded in e-mail as embedded, not attachments Jim Firefox 4 12-11-2004 05:36 AM
Databind an embedded control in an embedded datagrid Thomas Dodds ASP .Net Datagrid Control 0 07-26-2004 08:20 PM



Advertisments