Ajith, you cannot be directly sending SMS to a mobile, instead you have buy service of any SMS Service Providers and they will provide you an API to work with, and you will be calling that API to send SMS. Typically the API requires mobile no and the text message.
Sending an SMS requires the service of a Mobile Network Service Provider. This you cannot do it all through your code