I want to send SMS using my java program. The scenario is that i have a server on which management program(written In java) is running. User can post their problems on the server. I want that when someone post their problem on server my java program generate an SMS to the user mobile number that your problem has been submitted. I searched Google and found that you can use Java Mail API to send sms to user. I tried the program given on this link
i used these parameters
......
public void msgSend() {
String gmailUserName = "xxxx@gmail.com";
String gmailPassword = "xxxx";
String smtpHost = "smtp.gmail.com";
String compression = "My Sms Compression information";
String from = "Basit@smtp.gmail.com";
String to = "03072525725@sms.smtp.gmail.com";
String body = "Hi how r u";
Transport myTransport = null;
...
...
After using this i received an email on my Gmail account with the following error
Delivery to the following recipient failed permanently:
03072525725@sms.smtp.gmail.com
Technical details of permanent failure: DNS Error: Domain name not found
I think that perhaps i didn't configure my Gmail account for mobile that's why i got this error. But i want to ask is it possible that i send sms using Java Mail API?