예제 #1
0
        public static void SendMessage(TwilioMessage msg)
        {
            try
            {
                var twilio = new TwilioRestClient(AccountSid, AuthToken);

                twilio.SendMessage(twilioPhoneNumber, msg.SentToPhone, msg.Message, message =>
                {
                    Trace.TraceInformation("Trilio message sent to " + message.To);
                });
            }
            catch (Exception ex)
            {
                Trace.TraceError("Failed to send Twilio Message " + ex.Message, ex);
            }
        }
        public static void SendMessage(TwilioMessage msg)
        {
            try
            {
                var twilio = new TwilioRestClient(AccountSid, AuthToken);

                twilio.SendMessage(twilioPhoneNumber, msg.SentToPhone, msg.Message, message =>
                {
                    Trace.TraceInformation("Trilio message sent to " + message.To);
                });
            }
            catch (Exception ex)
            {

                Trace.TraceError("Failed to send Twilio Message " + ex.Message, ex);
            }
        }