protected override async Task SendNotification(NotificationType type, string message, string failedAfter = null) { List<int> phoneIDs = _notification.Options[((int)Options.PhoneNumbers).ToString()].ToObject<List<int>>(); var phoneNumbers = _settings.Contacts.Where(x => phoneIDs.Contains(x.ID)).Select(x => x.Value); var to = string.Join(",", phoneNumbers.ToArray()); _logger.Info($"Sending SMS notification to {to}: {message}"); await _helper.SendSMS(new SMSMessage { To = phoneNumbers, Message = $"SystemChecker: {message}" }); }
/// <summary> /// 发送短信 /// </summary> /// <param name="mobile">手机号</param> /// <param name="message">短信内容</param> /// <returns></returns> public string SendSMS(string mobile, string message) { return(dal.SendSMS(mobile, message)); }