Example #1
0
        public override void SendMail(SchedulerExecutedCallBackModel schedulerExecutedCallBackModel)
        {
            schedulerExecutedCallBackModel.LogSchedulerAction(schedulerExecutedCallBackModel.Log4NetKey_Scheduler, CustomerLogFormatUtil.LogSchedulerMsgFormat(SchedulerExecutedCallBackModel.LocalIP, SchedulerExecutedCallBackModel.QuartzServerName, schedulerExecutedCallBackModel.OperateType, schedulerExecutedCallBackModel.OperateState), schedulerExecutedCallBackModel.Exception);
            var mailClient = new MailClient();

            mailClient.SendMail(new MailMessageConfigurationInfo {
                Body = CustomerLogFormatUtil.LogSchedulerMsgFormat(SchedulerExecutedCallBackModel.LocalIP, SchedulerExecutedCallBackModel.QuartzServerName, schedulerExecutedCallBackModel.OperateType, schedulerExecutedCallBackModel.OperateState), Subject = schedulerExecutedCallBackModel.Subject, ToMailAddressList = schedulerExecutedCallBackModel.ToMailAddressList
            });
        }
        public override void SendMail(SchedulerExecutedCallBackModel schedulerExecutedCallBackModel)
        {
            var dateStart  = DateTime.Now;
            var mailClient = new MailClient();

            mailClient.SendMail(new MailMessageConfigurationInfo {
                Body = CustomerLogFormatUtil.LogSchedulerMsgFormat(SchedulerExecutedCallBackModel.LocalIP, SchedulerExecutedCallBackModel.QuartzServerName, schedulerExecutedCallBackModel.OperateType, schedulerExecutedCallBackModel.OperateState), Subject = schedulerExecutedCallBackModel.Subject, ToMailAddressList = schedulerExecutedCallBackModel.ToMailAddressList
            });
            var dateEnd = DateTime.Now;
            var message = CustomerLogFormatUtil.LogSchedulerMsgFormat(SchedulerExecutedCallBackModel.LocalIP, SchedulerExecutedCallBackModel.QuartzServerName, schedulerExecutedCallBackModel.OperateType, schedulerExecutedCallBackModel.OperateState);

            CustomerLogUtil.Info(message, new CustomerLogParameters(schedulerExecutedCallBackModel.GuId, "SendMail", message, "", dateStart.ToString("yyyy-MM-dd HH:mm:ss.ffff"), dateEnd.ToString("yyyy-MM-dd HH:mm:ss.ffff"), $"{((dateEnd.Ticks - dateStart.Ticks) / 10000)}ms"));
        }
Example #3
0
 protected void NotifyAsync(SchedulerExecutedCallBackModel schedulerExecutedCallBackModel)
 {
     _schedulerExecutedCallBack.BeginInvoke(schedulerExecutedCallBackModel, null, null);
 }
Example #4
0
 public abstract void SendMail(SchedulerExecutedCallBackModel schedulerExecutedCallBackModel);