private static void send_notification(string send_to, string message_text) { SendNotification .from(BombaliConfiguration.settings.email_from) .to(send_to) .with_subject("Bombali") .with_message(message_text) .and_use_notification_host(BombaliConfiguration.settings.smtp_host); }
public void send_notification(bool success, string response) { string reporting_type = "BAD"; if (success) { reporting_type = "GOOD"; } string subject = string.Format("{0} - \"{1}\" {2}", ApplicationParameters.name, name, reporting_type); string message = string.Format("{0} reports {1} for {2}.", ApplicationParameters.name, response, what_to_check); try { SendNotification.from(who_notification_comes_from).to(who_to_notify_as_comma_separated_list).with_subject( subject).with_message(message).and_use_notification_host(notification_host); } catch (Exception ex) { Log.bound_to(this).Error("{0} is not able to send email for monitoring error.{1]{2}", ApplicationParameters.name, Environment.NewLine, ex.ToString()); } }