Search email headers

  • Thread starter Thread starter Dan Frederick
  • Start date Start date
D

Dan Frederick

Does anyone have a VBA script or trick to searching the
headers of email messages? I think it would be a good way
to try to determine the identity of some of these
anonymous viruses that have been floating around.

If you could search all of your stored mail for a
particular IP address, you may be able to trace it to a
legitimate sender ID.

PS Since MS doesn't seem to allow me to read all the
postings, in addition to posting an answer here, please
also email me at:

junk
....
<at>
....
shosystems
....
<dot>
....
com

Thanks,

Dan
 
Most modern viruses fake the sender and can use relays and other
methods to disguise who sent the message.

You can get the email headers as a string and parse that string for
whatever you want, but you can't use the Outlook object model for
that. You would have to use CDO 1.21 (optional installation for
Outlook 2000 and later and subject to the security prompts), Extended
MAPI (C++ or Delphi only) or Redemption code
(www.dimastr.com/redemption).

To see a CDO sample for getting the Internet headers see
http://www.slovaktech.com/code_samples.htm#InternetHeaders. Remember
you must have CDO 1.21 (CDO.DLL) installed and referenced in your
project for this code to work.
 
Back
Top