private void SendError(string serverNr)
        {
            var messageText = $"Serwer numer: {serverNr} nie odpowieada!!!";

            Logger.Info(SerwerSMS.SendSms(_loginSms, _passSms, _phoneNumber, messageText));
            Logger.Info(messageText);
        }
示例#2
0
        public static string SendSms(string login, string pass, string phoneNumber, string messageText)
        {
            try
            {
                var serwerssms = new SerwerSMS(login, pass);
                var data       = new Dictionary <string, string>();

                String phone  = phoneNumber;
                String text   = messageText;
                String sender = null;

                var response = serwerssms.messages.sendSms(phone, text, sender, data).ToString();

                return(response);
            }
            catch (Exception ex)
            {
                return(ex.ToString());;
            }
        }