From: Parker Software Ltd [mailto:firstname.lastname@example.org]
Sent: Friday, July 15, 2011 3:31 AM
We are going to start the test tomorrow
Now, by default email2db will reply to both triggers now. I do not want the same email with the same trigger going to the same user, makes no sense. So, I came up with the follow script I thought I would share and save someone else the time. Add this to your condition script and no dupes should ever happen.
Please note I am not using the built in database, I configured email2db to use SQL Server.
Dim blnDupe As Boolean
Dim strConnectionString As String
Dim strTriggerID As String
Dim strSQL As String
blnDupe = False
strConnectionString = "Provider=SQLOLEDB.1;Data " & _
"Source=MYSQLSERVER;Initial Catalog=Email2DB;user id = 'ID';password='PASSWORD'"
strSQL = "Select TriggerID from Triggers where TriggerName = 'MYTRIGGERNAME"
strSQL = strSQL + " And TriggerSuccess = 1 And TriggerID = '"
strSQL = strSQL + strTriggerID + "' AND FromAddress = '" + MSG_From + "'"
Set objRS = objcon.Execute(strSQL)
Do Until objRS.EOF
blnDupe = True
If blnDupe = False Then Email2DBTrigger = True
Just a heads up, you may have to add to the triggerID lookup the accountID if you use multiple accounts.