Now the problem with this code it is not very scalable. My thought to improve it is to create a list of names in an array and compare aginst the array. Not sure how to do that in vbScript, but i am sure someone has, and when i figure it out i will post it. However if there is a better way of doing this i would be greatly appreciative.
Code: Select all
Sub OnAcceptMessage(oClient, oMessage) Dim ReRoute ReRoute = False Dim oRecipients Set oRecipients = oMessage.Recipients For i = 0 To oRecipients.Count - 1 If oRecipients(i).IsLocalUser = False Then ReRoute = True Next If InStr(oMessage.From, "someone@somewhere") And ReRoute = True Then ReRoute = True Else ReRoute = False End If If ReRoute = True Then Result.Value = 1 Else Result.Value = 0 End If End Sub
Jason C. Kelley