void TimerElapsed(object sender, ElapsedEventArgs e) { try { DoInvoke(); } catch (Exception ex) { DefaultEmailSender.Send(string.Format("Error in {0}", this.GetType().Name), ex.ToString()); } }
public override void DoInvoke() { try { const string subject = "Echo search failed"; const string body = "Call to echo SearchSupporterGroup method failed - the echo service appears to be down"; if (!SearchSuccessful()) { //search again if (!SearchSuccessful()) { SmsSender.Send(subject, body); EmailSender.Send(subject, body); } } } catch (Exception ex) { _defaultEmailSender.Send("Echo search failed", string.Format("Call to echo SearchSupporterGroup method failed: {0}", ex)); } }
public void Execute() { _defaultEmailSender.Send("mailer startup", "mailer startup plugin executed"); }