How to send an SMS from my Java Application

Hi,

I basically need to implement User verification for the application I have been working on. This involves sending an SMS to the mobile number of the User giving him a Verification Code. This code will be used by the user to get his account activated.

Right now I am able to get emails for User verification. Need to implement SMS stuff also. Please help me with how I can work on it and get this implemented. Please let me know If any more information is required.

Thanks in Advance:)

I have NEVER done this but I can give a few input on this. First, you probably need to find SMS provider and most likely you’ll have to pay for the service. Then, download some open source SMS code. I’m sure there are zillions.

Another free option. I have seen a crazy idea of using Google Voice to send SMS through HTTP scraping and requests. It’s totally do-able. Use Java as a browser client to login to Google Voice then send sequential HTTP requests to send SMS.

I’m totally new to all these stuffs. So if you could kindly elaborate the Google voice option to give me some more idea on that, it would be very helpful for me.

Thank You.

If you want the easy way out, then paying service is good idea. For free google voice “hack”, you’ll have to work for it. Of course, I can’t elaborate down to the code. Only thing I can suggest is to research on these keywords through Google Search.

Java HTML Parser
Java HTTP URL Request

Basically, you’re creating non-UI Java browser. So when your program runs, it’ll goto http://www.google.com/voice, then it logs in, then execute SMS URL requests. Again, this is not trivial task if you’re new to Java. If you’re unsure of what I’m talking about then go w/ SMS provider.

BTW, I do have a friend who has SUCCESSFULLY implemented this solution but he won’t give it out for free. I’m pretty sure SMS will be a lot cheaper but if you’re still interested then send me a message.

Its actually quite easy.

Look up SMS gateway. TO send a text, your really just sending any EMAIL with the SMS gateway. It’s very easy.

for instance, verizon’s is: yournumber@vtext.com or yournumber@mms.vext.com

so jsut have the user input the phone number and their carrier and then send email out using JavaMail.

Thanks ge0man. But I have two questions;

  • I guess Verizon is one such gateway that can be used. If this is right, is it a free service or a paid service?
  • I am located in Bangalore , India. Is the gateway you have mentioned functional in India? If not, then can you name me some free service providing gateways that I can use here?

Yes it free for you… If you can email to email addresses in america, then you are fine.