How can I capture the New Mail Event Handle?
-
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?
-
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?
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
-
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
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