Scanning all incoming e-mails

  • Thread starter Thread starter Al_21_11
  • Start date Start date
A

Al_21_11

Hi

scan all new incoming e-mails and post archiving email by posting to DB. i
have the second part down. I will be calling a class that will handle posting
record to DB, but need to know how can i get all incoming e-mails.

Thanks
 
HI Ken,
Thanks that works. Is there a way of running this same routine when users
use outlook web access?
 
No. OWA runs on an IIS server and is javascript code that directly accesses
the Exchange mailbox. It has nothing to do with Outlook or Outlook code. For
something to work with OWA you would need server side code that runs as an
Exchange event sink on the mailbox folders you're interested in. If you go
that route you wouldn't use the Outlook code at all since that would run
similar code twice.
 
HI
ken
would the same routine work if outlook has several different e-mails
accounts. is there a way i can specify which e-mails account to scan incoming
e-mails from?

thanks
al
 
You can use the MailItem.SenderEmailAddress property to see what email
address sent an email and you can use To for who it was sent to. However, To
usually is just a name like "Ken Slovak" and not an email address. For that
you'd need to get each item's Recipients collection and get each Recipient
object. There may be more than one of course.
 
Hi Ken,
Would this work.

If i use the Application.NewMailEx() to get all incoming e-mails, and then
use a filter to for the "TO" field and filter e-mails from inboxes that i do
not need?

hope im making sense.

thanks
Again
Al
 
Any Outlook profile can only have one delivery point (Inbox), so items going
to other stores won't fire that event.
 
Back
Top