Hello. I have a script that monitors a website and sends an email if the site is down. My issue is, I want to just receive one email in the span of the 10 minutes the program is ran. So, essentially, the program is run every 10 minutes. Should the specified error occur, an email is sent. My problem now is, if the error is existent after the 10 minutes, I get another email. I would just need one notification. How would I set this up programmatically? Thanks so much. Take care. My code for the SMTP is below:
if (myTitle[1] != "Login" || StatusResponse != "OK")
{
InfoMessage("Page could not load, an email is being sent to the webmaster")
Smtp.To="<somebody@somebody.com>";
Smtp.From= "host@somebody.com";
Smtp.Subject="Your Site is down!!";
Smtp.Message="Urgent! Urgent! Your Site is Down Smtp.Send();
InfoMessage(Smtp.GetStatusLine());
}
if (myTitle[1] != "Login" || StatusResponse != "OK")
{
InfoMessage("Page could not load, an email is being sent to the webmaster")
Smtp.To="<somebody@somebody.com>";
Smtp.From= "host@somebody.com";
Smtp.Subject="Your Site is down!!";
Smtp.Message="Urgent! Urgent! Your Site is Down Smtp.Send();
InfoMessage(Smtp.GetStatusLine());
}