SMTP header, NewMail event

  • Thread starter Thread starter Dan
  • Start date Start date
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
 
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.
 
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.
 
Back
Top