Re: Store event sink wont fire

From: Glen Scales [MVP] (gscales_at_outlookexchange.com)
Date: 03/12/04


Date: Fri, 12 Mar 2004 12:48:41 +1100

Your script look okays so some other things you could check are

Check the event registration by doing a /enum with regevent.vbs and check
all the properties look as they should

If you have access to VB try using Exchange Explorer from the SDK
Development tools to register the event, you can also use the Exchange
explorer to look at the Event registration object which is a hidden object
in the users Mailbox

Sometimes I've seen antivirus programs quarantine the script code so you end
up with a registered event with nothing inside it. You can try the following
code snipit to check whats inside your event registration

set msgobj = createobject("CDO.Message")
msgobj.datasource.open
"file://./backofficestorage/mydomain.com/mbx/TestAccount/inbox/evtsnk1 "
set stm = CreateObject("ADODB.Stream")
Set stm = msgobj.GetStream
stm.savetofile "c:\dumpmsg.txt"

I know you have said you have checked permissions but you need to be careful
by default in Exchange 2003 accounts with Domain Administration rights are
explicitly denied access to all mailboxes except their own. The easiest way
to test this is try creating an outlook profile to the mailbox with the
event sink using the account that your Com object is running under and see
if this works. I'd also make sure the account has full mailbox access (not
just read).

Cheers
Glen

"Jayashree Iyer" <smart_jayu@hotmail.com> wrote in message
news:e04669a0.0403111205.40976fc3@posting.google.com...
> Im trying to write a simple store event sink that is just creating a
> log file in the same directory. But the sink does not seem to fire. I
> created the sink as a VBScript and then used eshmts.vbs to create a
> COM wrapper, specifiying the Domain Administrator as the account to
> run under.
> My script code is as below.
> <SCRIPT LANGUAGE="VBScript">
>
> Sub ExStoreEvents_OnSave(pEventInfo, bstrURLItem, lFlags)
> Set fso = CreateObject("Scripting.FileSystemObject")
> set wfile = fso.opentextfile("c:\EventSink\tevent.txt",2,true)
> wfile.write (bstrURLItem)
> wfile.close
> set fso = nothing
> set wfile = nothing
> End Sub
>
> </SCRIPT>
>
> I have verified that the Domain administrator has read access to the
> mailbox in question that the event is registered on.
> This is the command I use to register the script :
> cscript regevent.vbs ADD "onsave" ExOleDB.ScriptEventSink.1 file://
> ./backofficestorage/mydomain.com/mbx/TestAccount/inbox/evtsnk1 -file
> c:\Eve
> ntSink\Monitormailbox.vbs
>
> How do i even troubleshoot this?
> I am using Exchange 2003 for development.
> ANy help would be really appreciated.
> Thank you.
> Jayashree



Relevant Pages

  • Re: Accessing an email account programmatically
    ... right click on the user account for the Exchange Mailbox that you want ... Click on the "Exchange Advanced" tab and then click on the "Exchange Rights" ... An Event Sink can be thought of as a true server side ...
    (microsoft.public.exchange.applications)
  • Re: Accessing an email account programmatically
    ... right click on the user account for the Exchange Mailbox that you want ... Click on the "Exchange Advanced" tab and then click on the "Exchange Rights" ... An Event Sink can be thought of as a true server side ...
    (microsoft.public.exchange.admin)
  • Re: Dealing with Bounced Email
    ... >> an account that will be monitored by a script: ... >Okay, but, how does one set up a PHP script to monitor bounced email ... which polls a mailbox using POP3, IMAP, or just opens the mailbox ...
    (comp.lang.php)
  • Re: Mail Notification
    ... I would look at using a Store Event Sink I would suggest looking at the ... event sinks are more flexible and reliable then agent script. ... The regular one is monitored by secretaries, the private one is ... > mailbox. ...
    (microsoft.public.exchange2000.development)
  • Re: Mail Notification
    ... I would look at using a Store Event Sink I would suggest looking at the ... event sinks are more flexible and reliable then agent script. ... The regular one is monitored by secretaries, the private one is ... > mailbox. ...
    (microsoft.public.office.developer.outlook.vba)