Exemple #1
0
        static void Main(string[] args)
        {
            string comilioUsername = "******"; // Please register on https://www.comilio.it
            string comilioPassword = "******";
            string sender          = "ComilioTest";

            string[] recipients = { "+393400000000", "+393499999999" };
            string   text       = "Hello World!";

            var sms = new SmsMessage();

            sms.Authenticate(comilioUsername, comilioPassword)
            .SetSender(sender)
            .SetType(SmsMessage.SMS_TYPE_SMARTPRO)
            .SetRecipients(recipients);

            if (sms.Send(text))
            {
                Console.WriteLine($"Sent SMS Id: { sms.GetId() }");

                foreach (var status in sms.GetStatus())
                {
                    Console.WriteLine($"Message to { status.PhoneNumber } is in status { status.Status }");
                }
            }
        }