Click here to Skip to main content
15,923,087 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
public class MobileSMS
{
    public MobileSMS() { }

    public void SendMessage(string MobileNumber, string Message)
    {
        if (bool.Parse(ConfigurationManager.AppSettings["SendSMS"]))
        {
            try
            {
                RestClient rClient = new RestClient("1256", "123", RestClient.ENV_PRODUCTION);
                Hashtable result = rClient.sendSMS(Message, MobileNumber, "Cash Club", 72, "", "");
            }
            catch
            {
            }
        }       
    }
}

this is the code here i am unable to understand how this restclient is working
Posted
Updated 28-Jun-13 21:25pm
v2

1 solution

Hello Alok,

If I am guessing right, you are using RestClient class from TextMarketer SMS[^] Library located on GitHub. The first line in the try block creates the RestClient instance the first argument being the user name, second being the password of your TextMarketer account. The last parameter represents the environment to be used. The Sandbox environment is used for simulation/testing purpose while Production is used for actually work. The second line actually initiates the delivery process.

How exactly the RestClient works can be found by looking at the code found at the link mentioned earlier.

Regards,
 
Share this answer
 
Comments
Alok.singh1166 29-Jun-13 4:11am    
Thanks Alot Prasad
Prasad Khandekar 29-Jun-13 4:13am    
Hello,

Please mark the answer as accepted if it has helped in solving your problem, so that question gets closed.

Regards,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900