Is it possible to somehow use PHP to read the contents of a .pst file?
Asked
Active
Viewed 5,692 times
5
-
I doubt it, PST is a rather complex closed format. See the FAQ at this page: http://www.mailnavigator.com/reading_ms_outlook_pst_files.html – Piskvor left the building Jul 11 '10 at 11:49
-
I am not aware of a library that does this. Your best bet would be to use the [COM extension](http://www.php.net/manual/en/book.com.php). – Gordon Jul 11 '10 at 11:47
-
This is no longer true, see http://msdn.microsoft.com/en-us/library/ff385210.aspx – AndreKR Jan 04 '14 at 04:20
2 Answers
2
There's a standalone program to convert PST to other formats (which may be then readable using PHP extensions, e.g. php_imap): http://www.five-ten-sg.com/libpst/
However, as Microsoft keeps changing the PST format, it's not guaranteed that you'll be able to convert all PST files.

Piskvor left the building
- 91,498
- 46
- 177
- 222
-
2At least since your answer in 2010 it hasn't been changed anymore, see http://msdn.microsoft.com/en-us/library/ff385210.aspx – AndreKR Jan 04 '14 at 04:21
1
Exporting folders from MS Outlook (FILE -> OPEN -> IMPORT -> EXPORT TO A FILE) into plain text CSV enables easy parsing e.g. via fgetcsv function. The libpst
is only supported on linux (RPM).
Format of PST file is complex and parsing it with PHP would be a tremendous job.

lubosdz
- 4,210
- 2
- 29
- 43