File: D:/bin/scripts/MarketingMailshots.vbs
' (SS,26/02/25) marketing mailshots run at a scheduled time (see Control Panel for actual schedule)
' currently only applicable to CIRC, added www.castironradiatorcentre.co.uk
AddLog ""
' create the mailshot records
' (SS,27/8/25) commented out 6 lines due to new site
'Call CreateMaketingMailshots("https://www.castironradiatorcentre.co.uk/exec-sql-store.asp?sqlstore=CancelledOrder24Hours")
'Call CreateMaketingMailshots("https://www.castironradiatorcentre.co.uk/exec-sql-store.asp?sqlstore=AbandonedCart")
'Call CreateMaketingMailshots("https://www.castironradiatorcentre.co.uk/exec-sql-store.asp?sqlstore=AbandonedQuote")
' send the mailshot emails
'Call CreateMaketingMailshots("https://www.castironradiatorcentre.co.uk/send-marketing-mailshot.asp?tpn=Cancelled+Order+24+Hours&testmode=false")
'Call CreateMaketingMailshots("https://www.castironradiatorcentre.co.uk/send-marketing-mailshot.asp?tpn=Abandoned+Cart&testmode=false")
'Call CreateMaketingMailshots("https://www.castironradiatorcentre.co.uk/send-marketing-mailshot.asp?tpn=Abandoned+Quote&testmode=false")
Sub CreateMaketingMailshots(AURL)
On Error Resume Next
Dim objRequest
Set objRequest = CreateObject("Microsoft.XMLHTTP")
AddLog "1. Started: " & AURL
objRequest.open "GET", AURL, False
objRequest.send
AddLog "2. Finished: " & AURL
Set objRequest = Nothing
End Sub
Sub AddLog(AMessage)
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("D:\Logs\Marketing Mailshots\MarketingMailshotsLog.txt", 8, True)
f.WriteLine(Now & " - " & AMessage)
f.Close
Set f = Nothing
Set fs = Nothing
End Sub