The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Email::PST::Win32 - Writing and updating PST files using Outlook Redemption on Windows

SYNOPSIS

        # Open an existing or new PST file

        my $pst = Email::PST::Win32->new(
                filename     => 'path/to/file.pst',
                display_name => 'My PST File',
        );

        # Add an MIME file to the PST

        my $file_path   = 'c://path/to/source/Inbox/Important/1.eml';
        my $folder_path = 'Inbox/Important';
        my $type        = index(lc $file_path, 'drafts')>0 ? 'note' : 'post';
        $pst->add_mime_file( $file_path, $folder_path, $type );

        # Errors may occur when high numbers of items are added.
        # A count_per_session > 0 will determine when to close and
        # reopen the PST file. The default value is 1000.

        $pst->count_per_session( 2000 );

        # Get number of MIME files added

        my $count = $pst->instance_counter;
        
        # Close the PST file

        $pst->close;
        

DESCRIPTION

This is a wrapper for using the Outlook Redemption (http://www.dimastr.com/redemption/) library to create and update PST files. However, while Outlook Redemption is a general purpose library, this module is currently limited to creating and updating PST files with MIME files located on the file system. Additional capabilties may be added in the future.

Requirements

This module requires Win32::OLE and Outlook Redemption.

SEE ALSO

http://www.dimastr.com/redemption/ (Outlook Redemption)

AUTHOR

John Wang <johncwang@gmail.com>, http://johnwang.com

COPYRIGHT

Copyright (c) 2009-2015 John Wang <johncwang@gmail.com>.

This software is released under the MIT license cited below.

The "MIT" License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.