public async Task <ActionResult> Mailing(string smstext) { List <SMSSend> SMSList = new List <SMSSend>(); if (smstext != "" && smstext != null) { SMSWorker sms = new SMSWorker(); var auth = sms.Auth("busforest", "5163809a"); foreach (var item in await db.Clients.GroupBy(p => p.Phone).ToListAsync()) { var send = sms.SendSMS("Msg", item.First().Phone, smstext, null); if (send[0] == "Сообщения успешно отправлены") { SMSList.Add(new SMSSend() { Verify = true, NumberUser = item.First().Phone, FIO = item.First().FIO }); } else { SMSList.Add(new SMSSend() { Verify = false, NumberUser = item.First().Phone, FIO = item.First().FIO }); } } } return(PartialView(SMSList)); }
public Task SendAsync(IdentityMessage message) { SMSWorker sms = new SMSWorker(); var auth = sms.Auth("busforest", "5163809a"); var send = sms.SendSMS("Msg", message.Destination, message.Body, null); return(Task.FromResult(0)); }