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

Hi, Has anyone worked on reading mails from the non-default folders created by the user in Outlook. Also let me know how to handle two mailboxes configured in the Outlook Client in Perl. Means how to set from which mailbox to read mails. Thanks in Advance.

Replies are listed 'Best First'.
Re: Reading mails from non default folders
by pryrt (Abbot) on Sep 13, 2016 at 13:14 UTC

    I haven't done much myself with Outlook automation; I mostly stick to Excel and Word... But if I needed to, here's where I'd look:

    I am assuming you found Mail::Outlook, and have determined it doesn't meet your needs. (I don't know anything about the module, except that it seems to be recent and actively maintained, so it probably handles modern Outlook.)

    If you're able to have a live Outlook running, then you can use Win32::OLE to access the well-documented Outlook Object model.

    Have you done a Super Search for "Outlook"?

Re: Reading mails from non default folders
by perl-diddler (Chaplain) on Sep 13, 2016 at 12:34 UTC
    Outlook uses a proprietary format for its internal folders. Even if the format is documented, they may use various forms of encryption for the whole folder or parts thereof. The only way to read such folders is by using some microsoft library functions (if they exist).

    I don't think you are going to find a perl solution to read them since a perl solution would tend to be open-source and would likely not able to be easily integrated with a MS-closed source solution. While it is be possible, I think it unlikely. Maybe someone else has more knowledge about this area though. Have you tried a google search, like 'read outlook folders with perl' ?

    Good luck.

Re: Reading mails from non default folders
by GotToBTru (Prior) on Sep 13, 2016 at 12:26 UTC

    What do you have so far?

    But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

      I am currently using Win32::OLE module to work with Outlook and I'm able to read mails from the Inbox but thought of creating a particular folder for some specific mails which need to be read by the Perl script.