#include #include $file = FileOpen("checks.txt" , 0) While 1 $answer = FileReadLine($file) If @error Then Exitloop local $ping1 = Ping($answer, 4000) If $PING1 = 0 Then Local $s_SmtpServer = "smtp.xxxxx.com" Local $s_FromName = @computername Local $s_FromAddress = @computername Local $s_ToAddress = "xxxxx@xxxxx.com" Local $s_Subject = ""& $answer &" DOWN" Local $as_Body[2] $as_Body[0] = "" Local $iResponse = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @computername, -1) Local $iErr = @error $Username = "" ; password for the account used from where the mail gets sent - REQUIRED $Password = "" ; port used for sending the mail $IPPort = 25 ; enables/disables secure socket layer sending - put to 1 if using httpS $ssl = 0 If $iResponse = 1 Then MsgBox($MB_SYSTEMMODAL, "Success!", "Mail sent") Else MsgBox($MB_SYSTEMMODAL, "Error!", "Mail failed with error code " & $iErr) EndIf ;MsgBox(0, "Status", ""& $answer &" Offline",3) else ;MsgBox(0, "Status", ""& $answer &" Online",3) EndIf Wend FileClose($file)