Reading outloook mails in PHP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Is it possible to read Outlook mails in PHP?? I would like to create a
php program that reads mails from a particular person which are
downloaded in MS Outlook.


Re: Reading outloook mails in PHP

i would like to do something similar actually. i havent ever actually
got around to playing with it. i would appreciate it if you would post
some code if you manage it.

as a help to you, outlook saves all of its data in a file called
outlook.pst (please note outlook express uses a different file) its in

C:\Documents and Settings\Administrator\Local Settings\Application
Data\Microsoft\outlook i thin or something like that. the directory
local settings is hidden if you didnt know.

im not sure about updated emails and not sure if this file is updated
when outlook is open or not but its a start.

you could create a php file that takes this outlook.pst file in and
makes some sense of it. de-microsofting the code will be a pain but im
sure theres a way. look at a php function called file() to grab the lot
into an array. or this way may be better as im not sure how arrays cope
with huge amounts of data like microsofts datafiles usually are. try

hope this helps

Sean Barton

Re: Reading outloook mails in PHP

I saw an MSDN article in  
which stated that pst came in different formats and folder size limits.

Quoted text here. Click to load it

Re: Reading outloook mails in PHP wrote:

Quoted text here. Click to load it

The PST file format has been reverse-engineered, documented and there is
code written in PERL to handle it. But its kind of a fscked up way of
solving the problem of reading Email on a platform with crappy integration.



Re: Reading outloook mails in PHP

Quoted text here. Click to load it

Although you don't say what platform you want to do this on, presumably
it is a Windows OS and you want to run it on the client that has MS
Outlook installed.

Your best bet is to use VBScript directly to access MS Outlook methods
and properties. See MSDN for details. You could drive a VBScript from
PHP but I don't see what value it would have to add this extra layer.
Alternatively you could use PHP's COM extensions to do the same job -
see previous comp.lang.php threads on that topic.


Site Timeline