SMTP header, NewMail event

D

Dan

Is there any way to access the SMTP headers of a specific
mail item from a COM Add-in?

And does anyone know this off hand? How many NewMail
events are generated for one Send and Receive? One? or
however many new mails there are? I know this one can be
tested, but would be easier to get it off someone.


Thanks,

Dan
 
K

Ken Slovak - [MVP - Outlook]

NewMail only fires at intervals, no matter how many items arrive. If
additional items arrive before the interval has passed you get no
notification. You are usually better off using Items.ItemAdd on the Inbox,
which also passes you the item that arrived. Just don't spend too much time
in the ItemAdd handler or you'd miss other items since the handler is not
re-entrant.

SMTP headers aren't available using the Outlook object model. You'd have to
use CDO 1.21 (an optional installation in Outlook 2000 and later and subject
to the security prompts when trying to get the headers in secure versions of
Outlook), Extended MAPI (C++ or Delphi only) or Redemption (3rd party
library located at www.dimastr.com/redemption) to get the headers.

See http://www.slovaktech.com/code_samples.htm#InternetHeaders for a CDO
1.21 code example of getting the headers and there's a Redemption sample on
that Web site.
 
D

Dan

Thank you for the reply. I don't have time to check out the links yet,
but I will keep them bookmarked and view them later.
 

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