Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Turn an rfc/822 type MIME part into an Outlook .msg file?

by blahblahblah (Priest)
on Jul 15, 2008 at 14:16 UTC ( #697721=perlquestion: print w/replies, xml ) Need Help??

blahblahblah has asked for the wisdom of the Perl Monks concerning the following question:

The web app that I maintain has an alternate email interface for editing data. A perl script downloads email from a POP/IMAP server, parses it using MIME::Parser, and processes the data. There is one type of attachment that it cannot handle the way our users would like.

When you save an email in Outlook, it saves in Outlook's binary format with a .msg extension. Some of our users take those mails and attach them to the email that they send into our system. They want our system to simply preserve the attachment and attach it to the record that they're editing. The problem is that either Outlook or Exchange "downgrades" the attachment into an rfc/822-type MIME part. (That makes total sense, because otherwise non-MS email clients wouldn't be able to read it.)

I have two ideas for solving this, and I'm not having much luck with either one.

  1. Find a way to get Exchange to give me the attachment as a .msg file.
  2. Find a way, in perl, to convert the rfc/822 part back into a .msg file.
Any ideas on how to achieve either of those, or alternate solutions?

Thanks, Joe

  • Comment on Turn an rfc/822 type MIME part into an Outlook .msg file?

Replies are listed 'Best First'.
Re: Turn an rfc/822 type MIME part into an Outlook .msg file?
by pc88mxer (Vicar) on Jul 15, 2008 at 14:39 UTC
    How about looking at Email::Outlook::Message. (Upon further inspection I see that you want to create an .msg file. Still, this module might be helpful since it shows how to parse one.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://697721]
Approved by pc88mxer
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2021-03-04 19:24 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (107 votes). Check out past polls.