Link to home
Start Free TrialLog in
Avatar of BrendanKing
BrendanKing

asked on

Create Event Sink to redirect email exchange 2003

Hi Guys

Please note I have never done an event sink before.

Trying to create an event sink that will copy incoming emial from one domain and send it to a second email address

I have copied smtpreg.vbs to the server.
and run scripts
cscript smtpreg.vbs /add 1 onarrival SMTPScriptingHost CDO.SS_SMTPOnArrivalSink "MAIL FROM=*@kingcomputer.com.au"

and

cscript smtpreg.vbs /setprop 1 onarrival SMTPScriptingHost Sink ScriptName "C:\EventSink\Redirect_ES.vbs"

This looks to complete successfully so I assume the issue is with my event sink script.
See attached code.
<SCRIPT LANGUAGE="VBScript">
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
Dim ForwardRcpt_str

ForwardRcpt_str="LGranger@Domain.com.au"

   If Msg.from="craig@domain.com.au" Then
	Msg.To=ForwardRcpt_str
   End If

    Msg.DataSource.Save

   EventStatus = cdoRunNextSink
End Sub
</SCRIPT>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of BrendanKing
BrendanKing

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial