Beispiel #1
0
 //method to send mail every 1 hour
 private string SendEmail()
 {
     if (Note.CheckForTable("Mails"))
     {
         List <string> mails = CustomMail.GetSearch(DateTime.Today.Year.ToString() + DateTime.Today.Month.ToString("D2") + DateTime.Today.Day.ToString());
         foreach (string mail in mails)
         {
             CustomMail.StaticSendMail(mail);
         }
         Thread.Sleep(3600000);
         return($"Planned mails sended up to:{DateTime.Today.Year.ToString()}-{DateTime.Today.Month.ToString("D2")}-{DateTime.Today.Day.ToString()} {DateTime.Today.Hour.ToString()}:{DateTime.Today.Minute.ToString()}");
     }
     else
     {
         return("none");
     }
 }