'START VB Script Document
'* PROPERTY OF BRANT PUTTKAMMER, PLEASE CONTACT ME IF YOU HAVE QUESTIONS
'* PLEASE USE CAUTION WHEN RUNNING THIS PROGRAM ON YOUR SYSTEM
Set ObjSendMail = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' DATE VARIABLES FOR LOG FILES
CurrentTime = Now()
' DATE VARIABLES FOR LOG FILES
EmailBodyText = "
Please verify the Application Exchange Server is up and running.
Call Cavion support at 866-629-7012.
"
' SET FILE NAMES AND GRAB TIMESTAMPS
ActuallySendEmail = "FALSE"
EmailGroup = "bputtkammer@uecu.coop,brant.puttkammer@gmail.com,djg@uecu.coop,d.gries@gmail.com"
Const ForAppending = 8
Set fso = CreateObject("Scripting.FileSystemObject")
demofile = "C:\Launch\Log\Gw.log"
Set noticefile = fso.OpenTextFile("D:\ARCHIVE\notice.txt", ForAppending, True)
If fso.FileExists(demofile) Then
Set demofile = fso.GetFile(demofile)
date1 = demofile.DateLastModified
'CurrentTime = minutes since file last changed
If DateDiff("n", date1, CurrentTime) > 15 Then
'date2 is more recent than date1, comparison by "day" ' ** Improvement **
EmailBodyText = "
Please verify the Application Exchange Server is up and running - the GW log was last modified on " & date1 & "
Call Cavion support at 866-629-7012.
"
ActuallySendEmail = "TRUE"
noticefile.WriteLine("ALERT: " & Now & " - " & DateDiff("n", date1, CurrentTime) & " time difference between now and last modified time stamp")
If DateDiff("n", date1, CurrentTime) > 60 Then
EmailGroup = "bputtkammer@uecu.coop,brant.puttkammer@gmail.com,1112223333@txt.att.net"
Else
EmailGroup = "bputtkammer@uecu.coop,brant.puttkammer@gmail.com"
End If
Else
EmailBodyText = "
date diff less than 0 - " & date1 & "
"
ActuallySendEmail = "FALSE"
noticefile.WriteLine("OK: " & Now & " - " & DateDiff("n", date1, CurrentTime) & " time difference between now and last modified time stamp")
End If
Else
EmailBodyText = "
Please verify the Application Exchange Server is up and running - the GW log was last modified on NO FILE FOUND
Call Cavion support at 866-629-7012.
"
ActuallySendEmail = "TRUE"
noticefile.WriteLine("ALERT: 0 time difference between now and last modified time stamp - NO FILE FOUND")
End If
Set fso = Nothing
If ActuallySendEmail = "TRUE" Then
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
'**** Path below may need to be changed if it is not correct
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
Flds.Update
HTML = ""
HTML = HTML & ""
HTML = HTML & "
Savings Federally Insured to at least $250,000 by NCUA and backed by the full faith and credit of the United States Government. Savings insured to an additional $250,000 with Excess Share Insurance for a combined coverage of at least $500,000. We do business in accordance with the Federal Fair Housing Law and the Equal Credit Opportunity Act.
© " & Year(Date()) & " United Educators Credit Union Privacy Third Party Link Notice