exchangefreaks.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IIS Virtual SMTP EventSink

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Development
Author Message
YCH



Joined: 12 Feb 2008
Posts: 1

PostPosted: Tue Feb 12, 2008 5:11 am    Post subject: IIS Virtual SMTP EventSink Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
EventSink, VBScript and mail sending On Exchange 2003 I created COM+ Application, as it's identity I set domain account which is member of domain admins. Then I created a VBScript event sink which I registered using Exchange Explorer in public folder. It's fired by OnSave events, and if it's

Exchange SMTP sink for undeliverable messages A while ago I wrote a managed SMTP sink to redirect messages from one e-mail address to another. Now I am trying to write a sink to process all undeliverable messages. I have a system sending mass mail

Porting mail routing DLL to SMTP Event Sink I'm porting an old exchange server 5.5 mail routing DLL to a SMTP Event Sink. The plan is to keep the existing code and wrap the call to with a interface. All is going well except that I can't find any documentation on th

smtp Virtual server How do i setup a Second virtual server to try and send all email to one domain out this second one instead of the original one. I have an issue sending to one particular domain in China and i want to know if there is a way to setup a second virtual server

multiple smtp virtual servers what is the purpose of multiple smtp virtual servers in exchange?
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group