Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How can I capture the New Mail Event Handle?

How can I capture the New Mail Event Handle?

Scheduled Pinned Locked Moved Visual Basic
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KiranGrover
    wrote on last edited by
    #1

    On receiving a new mail, I want to capture its handle , so as to read it's subject. this thing should be done on new mail event?

    B 1 Reply Last reply
    0
    • K KiranGrover

      On receiving a new mail, I want to capture its handle , so as to read it's subject. this thing should be done on new mail event?

      B Offline
      B Offline
      bhartik
      wrote on last edited by
      #2

      hi Kiran, If u want to capture the new mail event ie. u want to capture the event as soon as mail comes to SMTP. Firslty specify that when you want to capture this event, becuase there are two servers i.e 1. SMTP 2. NNTP Again, when do you want to capture it? i.e. 1. as soon as mail comes to mail server 2.or as soon as mail comes to your Inbox, ie. in drop directory. Becuase in the above two senarios, different implementatin is there. The best way to capture is On The SMTP server itself. SMTP supports CDO which gives you the interface called ISMTPOnArrival. So implementing this interface , you can capture the event. Becuase ISMTPOnArrival interface has a method called OnArrival which gets triggered as soon as new mail comes to the server from anywhere. If you specify your requirements then may be i can help you little bit. regard bharti. bharti

      B 1 Reply Last reply
      0
      • B bhartik

        hi Kiran, If u want to capture the new mail event ie. u want to capture the event as soon as mail comes to SMTP. Firslty specify that when you want to capture this event, becuase there are two servers i.e 1. SMTP 2. NNTP Again, when do you want to capture it? i.e. 1. as soon as mail comes to mail server 2.or as soon as mail comes to your Inbox, ie. in drop directory. Becuase in the above two senarios, different implementatin is there. The best way to capture is On The SMTP server itself. SMTP supports CDO which gives you the interface called ISMTPOnArrival. So implementing this interface , you can capture the event. Becuase ISMTPOnArrival interface has a method called OnArrival which gets triggered as soon as new mail comes to the server from anywhere. If you specify your requirements then may be i can help you little bit. regard bharti. bharti

        B Offline
        B Offline
        bhartik
        wrote on last edited by
        #3

        Hi, Kiran Ok so you want to catch the incoming mails for SMTP services. Basically SMTP allows to write a sink class for its EventDispature to pass the meassages through it. Event architecure of a SMTP is based on COM. So firstly you need to understand the event architecture ,and related information is given in msdn. MSDN Home > MSDN Library > Messaging and Collaboration > SMTP Server so go through it.It will help you alot in implementing ISMTPOnArrival interface which i have mentioned in my first reply. This is a vast concept, so i will suggest you to go through it first , even if u find any difficulty in that itself or in implementation, i can help yoy out. But it is very necessary to go through these articals before jumping on implementation. Following are two URLs , please go through it. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/ref_mb_smtpserver.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/ref_mb_smtpserver.asp regards, Ms.bharti

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups