Click here to Skip to main content
15,915,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to be able to send SMS messages from my vb.net Application to a cellular phone.
I already have an account with my local service providers. How do I go about it?
Please Help.

What I have tried:

I already have an account with my local service providers
Posted
Updated 7-Sep-16 3:44am

1 solution

Hi there;

when you buy a service from provider they may give you a webservice access. that webservice may be based on Soap or REST. you have to consume that webservice using that credits.
If they have SOAP webservice you have add the reference to your references via "Add Service Reference ..." in your VS project. (learn more about implementing webservices)
then you have to consume it like this:

C#
public static string[] SendSmsPackage(List<string> CellNumbers, List<string> Bodies)
{
    SmsService.smsSoapClient smsSrv = new SmsService.smsSoapClient();
    List<string> resultList = new List<string>();

    try
    {
        string[] result = new string[] { };
        result = smsSrv.doSendArraySMS(SmsServiceUserID, SmsServicePassWD, SmsServiceProviderNumber, CellNumbers.ToArray(), Bodies.ToArray());

        return result;

    }
    catch(Exception ex)
    {
        throw ex;
    }
}



This provider gave me the address of their webservice that i used it when i wanted to add the "service reference". and also userId, password and a cell number (SmsServiceProviderNumber) that was dedicated for me. they get list of numbers and message bodies and pass me the sending results as you see. thats it.
there is another method to get delivery status based on return codes they gave me in result array.

ask them for documentations and examples or search in their website and you will find something for sure.

i hope this help you.
have fun.
 
Share this answer
 

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