ASP.NET: Send SMS using MVC using Red Oxygen


Sending SMS from mvc application using Red Oxygen service is pretty easy.


  • Reach people near-instantly, wherever they’re at
  • Send SMS to specific individuals or entire lists
  • Save time & money, compared with phone calls
  • Schedule SMS to automatically send at a specified time
  • Send urgent alerts with just the click of a button
  • Easily reach people all over the world

Get Free Trial Account:

  • Fill form at Sign up for free
  • Trial Account Specifics:
    1. Includes 25 SMS credits
    2. Trial is completely free – no third-party billing
    3. No credit card info collected
    4. Live customer support
  • Create trial account signing in to website using Email and Password. You will receive Account ID.


public String TestRedOxygen(SmsModel obj)
   var client = new WebClient();
   const string requestUrl = "";
   string requestData = "AccountId=" + "account id"
                                 + "&Email=" + System.Web.HttpUtility.UrlEncode("sign-in email")
                                 + "&Password=" + System.Web.HttpUtility.UrlEncode("sign-in password")
                                 + "&Recipient=" + System.Web.HttpUtility.UrlEncode(obj.Reciever)
                                 + "&Message=" + System.Web.HttpUtility.UrlEncode(obj.Message);
   byte[] postData = Encoding.ASCII.GetBytes(requestData);
   byte[] clientResponse = client.UploadData(requestUrl, postData);
   String result = Encoding.ASCII.GetString(clientResponse);
   int resultCode = System.Convert.ToInt32(result.Substring(0, 4));
   return resultCode.ToString();



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s