public ActionResult LastSMS() { SMSWorker sms = new SMSWorker(); var auth = sms.Auth("busforest", "5163809a"); return(Content("Осталось СМС: " + sms.GetCreditBalance())); }
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)); }
public async Task SendSms() { string clientphone = clientOrder.Phone.Replace(" (", string.Empty).Replace(") ", string.Empty).Replace("-", string.Empty); string clientbody = "Спасибо за заказ! Доставка завтра с ? до ?"; //string smsbody = "Новий заказ\n" + "Имя: " + txbName.Text + "\nТел.: " + txbPhone.Text // + "\nBox: " + BoxListOrders.SelectedValue + "\nДни: " + Numdays.SelectedValue // + "\nАдрес: " + txbAdr.Text; SMSWorker smsw = new SMSWorker(); smsw.Auth("cabbage", "7dayscabbage"); //Response.Write(smsw.SendSMS("Kapusta", "+380636472421", smsbody, null)[0]); }