This project is read-only.

To use SMS Over Email API, simply download and include the dll in your project. Then you can use it like below.  A more in-depth explanation of the API can be found on my blog, here.

using SMSOverEmail;

namespace SMSTest
{
    class Program
    {
        static void Main(string[] args)
        {
            SMSOverEmail.SMSOverEmail sms = new SMSOverEmail.SMSOverEmail();
            sms.EnableSsl = true;
            sms.SMTPUserName = "user@gmail.com";
            sms.SMTPPassword = "password";
            sms.Host = "smtp.gmail.com";
            sms.Port = 587;
            sms.PhoneNumber = "2345678901";
            sms.RecipientCarrier = Carrier.SprintPCS;
            sms.From = new System.Net.Mail.MailAddress("user@gmail.com");
            sms.Message = "test message";

            sms.SendTextMessage();
        }
    }
}

 

There are several overloads for SendTextMessage including:
SendTextMessage(){ ... }
SendTextMessage(string message){ ... }
SendTextMessage(string message, string subject){ ... }
SendTextMessage(string phoneNumber, Carrier carrier, string message){ ... }
SendTextMessage(string phoneNumber, Carrier carrier, string message, string subject){ ... }
SendTextMessage(string phoneNumber, Carrier carrier, string message, string subject, MailAddress from){ ... }

The following overloads are new in version 2.0:
SendTextMessage(TextMessage textMessage) { ... }
SendTextMessage(List<TextMessage> messages) { ... }
SendTextMessage(Dictionary<string, Carrier> numbers, string message, string subject, MailAddress from) { ... }

Last edited Jan 12, 2013 at 9:53 PM by jkarr, version 3

Comments

No comments yet.