public void Email_Envio() { IniciarTest(); if(!MailsSender.Send(new List<string> { "*****@*****.**" }, "Mail de Prueba de Envio", "HOLA MUNDO !!!", configEmail)) { throw new System.Exception("Fail"); } }
public static void KeepServiceOn() { new Thread(() => { if (ServiceAdapter.GetServiceStatus("GUIAdapter") == "Running") { isServiceIsOn = true; serviceHasDetected = true; prevent_close_attempts = 0; } else { if (prevent_close_attempts == 0) { MailsSender.SendUnusualActivityAlert(); } prevent_close_attempts++; ServiceAdapter.StartService("GUIAdapter", 10000); if (InternetBlocker.IsInternetReachable()) { InternetBlocker.Block(true); } if (ServiceAdapter.GetServiceStatus("GUIAdapter") == "Stopped") { if (serviceHasDetected) { BootController.DoExitWin(BootController.EWX_REBOOT); } } isServiceIsOn = false; } }).Start(); }