Is it possible to Extract IP Address from the message headers of E-Mails in .PST file.

N

Niks

Hi, I am working with .PST files to extract contents(programatically
using VB.NET) like sender's e-mail, the date and time sent etc from
each of the individual E-Mails. I also want to extract sender's IP
address from each of the E-Mail in .PST file. I know there is entry of
the IP address in the SMTP header, but don't know how to extract it or
access the header programatically. Can someone please tell me how to do
it? Or is there any property of MailItem Object to achieve this?
 
D

Diane Poremsky [MVP]

you need to use CDO to access header information. See outlookcode.com for
more information about programming.
 
N

Niks

Hi,
I want to Extract IP address for e-mails in an archived .PST file e.g.
backup.pst. And not of the e-mails in live session.
CDO gives the header of an e-mail in a live session. I want it for an
archived file.
I am reading an archived .PST file (backup.pst) and converting it to
..txt files, one for every e-mail. While storing it to .txt i want IP
address along with body and subject of e-mail. I am able to get subject
and body but not IP address.
Can somebody help me?
 
K

Ken Slovak - [MVP - Outlook]

If the PST file is opened in that Outlook session then CDO can easily get
the Internet email headers just as it would from an item in a default PST
file. Just iterate the Stores collection of the Session object until you
find the Store you want, get whatever folder you want and its Messages
collection, then iterate the Messages collection and pop the header out of
the Message object and parse it.

If you're having problems be more specific or show the code you're using.

BTW, this isn't a programming group. Programming questions are better in the
microsoft.public.outlook.program_vba group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top