PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins SMTP header, NewMail event

Reply

SMTP header, NewMail event

 
Thread Tools Rate Thread
Old 16-06-2004, 12:41 AM   #1
Dan
Guest
 
Posts: n/a
Default SMTP header, NewMail event


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
  Reply With Quote
Old 16-06-2004, 02:08 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: SMTP header, NewMail event

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_samp...InternetHeaders for a CDO
1.21 code example of getting the headers and there's a Redemption sample on
that Web site.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Dan" <dahamasta@hotmail.com> wrote in message
news:1d02301c45332$3d697c50$a401280a@phx.gbl...
> 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



  Reply With Quote
Old 16-06-2004, 07:14 PM   #3
Dan
Guest
 
Posts: n/a
Default Re: SMTP header, NewMail event

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.
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off