Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Use perl to create outlook .msg file

by Anonymous Monk
on Jan 07, 2012 at 03:53 UTC ( #946710=note: print w/ replies, xml ) Need Help??

in reply to Use perl to create outlook .msg file



use Mail::Outlook; my $outlook = new Mail::Outlook(); # create a message for sending my $message = $outlook->create(); $message->To(''); $message->Cc('Them <>'); $message->Bcc('Us <>;'); $message->Subject('Blah Blah Blah'); $message->Body('Yadda Yadda Yadda'); $message->Attach(@lots_of_files); $message->Attach(@more_files); # attachments are appended $message->Attach($one_file); # so multiple calls are allowed $message->save;

nah - Read Outlook .msg files Outlook MSG file format COM stuctured storage OLE2 compound documents

So ole storage, ddg://perl OLE storage outlook .msg, ddg:// OLE storage outlook .msg

Comment on Re: Use perl to create outlook .msg file
Download Code
Re^2: Use perl to create outlook .msg file
by aravinds (Initiate) on Jan 07, 2012 at 15:39 UTC
    Hi Anonymous Monk,

    Thanks for your time.

    $message->save; saves it in the Drafts folder within Outlook, but I need the program to create a file on the harddrive as a physical file (.msg).

    Did not find any useful code snippets on the duckduckgo search engine either.

      Um, go to MSDN, find the message object , look for save, save_to, etc, etc

      The solution is: $message->SaveAs('C:\test.msg');
        I am getting the following error message:- Unknown sub Mail::Outlook::Message::SaveAs

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://946710]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2015-05-23 04:25 GMT
Find Nodes?
    Voting Booth?

    In my home, the TV remote control is ...

    Results (465 votes), past polls