Hi,
I am going to write a EventSink program on the Virtual SMTP Server on
IIS.
The script is to wrtie the email subject & body to Windows EventLog
automatically. And I want it to apply to all incoming emails.
Right now the script is written as show below.
Sub IEventIsCacheable_IsCacheable()
'To implement the interface, and return S_OK implicitly
End Sub
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
Dim envFlds
Dim wshShell
Dim strCommand
Set envFlds = Msg.EnvelopeFields
Set WshShell = WScript.CreateObject("WScript.Shell")
strCommand = "eventcreate /T Error /so MySource /ID 1 /L Application /
D Testing"
WshShell.Run strcommand
End Sub
I use the smtpreg.vbs available on the net to register this script to
the Virtual SMTP Server.
For testing purpose, I just hardcode the event log and use telnet to
send email.
But it seems that the script won't work properly. Is there anything
goes wrong?
Thanks & regards,
YCH
Archived from group: microsoft>public>exchange>development