Hi, Can anyone provide me with a Sample VB Event Sink for Exchange 2000 Server that would fire when a mail is received by an email account and writes the details of this email to a file? Thanx in advance. Sid
What type of event sink are you looking at a Store Event sink or a SMTP event sink you could use either depending on what your trying to do eg do you only care about mail that coming in from outside of your network or do you want to get everything that was received internally and Externally. The best place to start would be the Exchange SDK which you can download from http://msdn.microsoft.com/exchange which has samples inside there is also the Exchange Event sink wizard which can be used from VB 6 to build a template for your code which includes logging diagnostic information. Cheers Glen "psid" wrote in message news:1133439175.252990.280820@g49g2000cwa.googlegroups.com... > Hi, > > Can anyone provide me with a Sample VB Event Sink for Exchange 2000 > Server that would fire when a mail is received by an email account and > writes the details of this email to a file? > > Thanx in advance. > > Sid >
Hi Glen, What I want to do exactly is to get the details of the mail I receive for a particular mailbox. The mail may be a meeting request or an appointment.I want to be able to access the internal details/properties of this new item (e.g. in the case of appointment it may be start time, end time, interval, location) and store them externally outside exchange. I am aware that an event sink can be used to recognize that a mail is received for a particular users mailbox but am not exactly knowing which event sink I would need to use. What are the differences between an SMTP sink and a store sink in terms of their usage in particular scenarios - I mean how do they differ exactly in their purposes? I have spent quite a lot of time on microsoft exchange site as well as the event sink wizard. A Teched presentation ("Programming With Exchange 2000 Store Events") mentions that the Exchange Store 2000 events can be further abstracted for applications such as Exchange 2000 Workflow but I am not able to get an example that I can use to extend for this purpose. It would be gr8 if someone could shed light on this. Thanx, Sid
Sounds like you want to look into using a Store Event sink (onsave or onsyncsave). The main difference between a store eventsink and a SMTP event sink is that a Store event sink in bound to a particular folder in Exchange (the inbox for example) and will fire on any transaction on the folder (like receiving a new email). A SMTP event sink is bound to SMTP verb and will fire when mail is being processed via that SMTP server. From what you have described I would start by looking at using a Async onsave event sink have a look at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_implementing_an_onsave_event_sink.asp. With a Meeting using CDOEX is the way to go see http://search.microsoft.com/search/results.aspx?qu=Processing+a+Calendar+Message+&View=msdn&st=b&c=4&s=1&swc=4 . You already know the Href so a lot of that code is redundant but it does demonstrates how to use ICalendarPart and Iappointment to get information out of the calendar request. You might be also interested in taking a look at the source for the autoaccept event sink which is doing the same type of thing http://sourceforge.net/projects/autoaccept-sink/ within an event sink. The stuff in the SDK is quite good at explaining workflow and event sinks but its not very detailed unfortunately you might want to look into buying a book to get you started with Exchange Development. If you look at the MS press book from Tom Rizzo Programming Microsoft Outlook and Microsoft Exchange 2003 that gives better in-depth coverage of sinks and workflow. Cheers Glen "psid" wrote in message news:1133495992.241619.65430@o13g2000cwo.googlegroups.com... > Hi Glen, > > What I want to do exactly is to get the details of the mail I receive > for a particular mailbox. > > The mail may be a meeting request or an appointment.I want to be able > to access the internal details/properties of this new item (e.g. in the > case of appointment it may be start time, end time, interval, location) > and store them externally outside exchange. > > I am aware that an event sink can be used to recognize that a mail is > received for a particular users mailbox but am not exactly knowing > which event sink I would need to use. > > What are the differences between an SMTP sink and a store sink in terms > of their usage in particular scenarios - I mean how do they differ > exactly in their purposes? > > I have spent quite a lot of time on microsoft exchange site as well as > the event sink wizard. > > A Teched presentation ("Programming With Exchange 2000 Store Events") > mentions that the Exchange Store 2000 events can be further abstracted > for applications such as Exchange 2000 Workflow but I am not able to > get an example that I can use to extend for this purpose. > > It would be gr8 if someone could shed light on this. > > Thanx, > Sid >