private void OnElapsedTime(object source, ElapsedEventArgs e) { timer.Stop(); try { EmailBusiness biz = new EmailBusiness(); biz.EnviaEmails(); } catch (Exception ex) { EventLog eventLog = new EventLog(); eventLog.Source = this.ServiceName; eventLog.WriteEntry("Erro na execução: " + ex.Message, EventLogEntryType.Error); } finally { timer.Start(); } }
public void GeraEmailEsqueciSenha(Usuario itemGravar, string novaSenha) { EmailBusiness biz = new EmailBusiness(); biz.GeraEmailEsqueciSenha(itemGravar, novaSenha); }