Java

Send SMS with Java scripts

This library allows you to send SMS from the Java platform. It gives you full control over the SMS message including the UDH field so you can create and send EMS messages, WAP push messages and Nokia smart messages (picture, ringtone etc.). The API can send SMS via a GSM phone connected to the serial port or via a SMS gateway like Clickatell. Visit the library: http://smsj.sourceforge.net



Code to send SMS in Java

Code Sample:

// Send SMS with clickatell SmsSender smsSender = SmsSender.getClickatellSender("username", "password", "apiid"); // The message that you want to send. String msg = "A sample SMS."; // International number to reciever without leading "+" String reciever = "461234"; // Number of sender (not supported on all transports) String sender = "461235"; smsSender.connect(); String msgids[] = smsSender.sendTextSms(msg, reciever, sender); smsSender.disconnect();