1) you should have an valid account with sanchar net, also 30 paise wud be deducted from your account for each SMS ( but it's cheap noo ,considering u have to send sms all over india... it's very cheap).
2) you can't use yahoo or hotmail for sending that mail u have to use the sancharnet smtp server, for example (smra.sancharnet.in).
3) The IP address from where your sending the mail should be from the BSNL pool ( if u need more clarification , mail me).
4) The smtp server needs authentication, so while writing your application make sure authentication is done.
IMPLEMENTATION
Now the theory part is over.. here is what ur application shud do. ur application shud be designed to communicate with the smtp server. i,e ur application shud be similar to a e-mail client program (outlook express) wich can send mails.. u'll find a lot of documentation for writing this application from Internet. The easiest wud be by using the JavaMail package provided SUN. u can download it from java site and use appropriate API's to write the application. but do remember that ur application should be written in a way that it supports smtp authentication. that is before u send mail using the smtp server u should authenticate yourself by the e-mail id and password given to u by sancharnet.
SMTP (briefly explained)
This section is to acquaint you with basics of Mail transfer, i recommend u read some Linux howto's on this topic. Now this is how mails get delivered in a network.. U have two programs: a mail server (smtp server.. which actually sends the mails.. Eg: SendMail,Qmail,Microsoft exchange ) and a mail client( which get the mail from user and delivers it to the mail server eg: outlook express). Now the server listens on a well known port 25, the client connects to this port and delivers the message, this communication between client and server to pass this mail is called the mail transfer protocol.. this is how this works.
step 1) client connects
2) client sends a < HELO hostname > command ( to identify itself)
3) server acknowledges it
4) client sends a command <MAIL FROM: xxx@xxx.com> ( the sender).
5) client sends a command <RCPT TO: bbb@xx.com>
6) client sends < DATA> the mail body
< then mail body goes here>
7) < . > to define end of message.
8) command <QUIT> to exit.
after these steps the mail is send by the mail server to the reciepient.
This is the standard procedure for sending e-mail. but here there is a glitch , the server should only deliver messages which is send by it's user that means the server should not accept messages by anybody but only by registered users ( in our case sancharnet users.). but the server would accept messages by anybody if the mail is destined for the sancharnet domain. else if the mail is for some other domain it wud forward that mail to that domain only if the user is a registered user.( this is called as mail relaying). now in our case SMS should only be sent by registered users of sancharnet so for that it uses a smtp version where after the HELLO command an AUTH command is used to authorize the sender who is sending the mail, that is why our mail client should be able to first authorize itself. so please write the mail client program in such a way that it authorizes itself with proper username and password. JavaMail has the class javax.mail.Authenticator to do the authentication.
That's all folks...
PS: if u guyz find this document in any way helpful, pls do remember the poor and needy and help them in any way possible.
If u have any queries or clarifications, you can mail me at benno@sancharnet.in .
GOD BLESS YOU