Simple and easy to implement. The interface supports sending multiple messages per request, allowing high traffic volume.
Single message:
SmsSender sender = new Sender(); TextMessage msg = new TextMessage(); msg.setSender("mycompany"); msg.setRecipient("4712345678"); msg.setText("Hello world!"); sender.sendTextMessage("username","password", msg);
Multiple messages:
SmsSender sender = new Sender(); // initialize message #1 TextMessage msg1 = new TextMessage(); msg1.setSender("mycompany"); msg1.setRecipient("4712345678"); msg1.setText("Hello world!"); // initialize message #2 TextMessage msg2 = new TextMessage(); msg2.setSender("mycompany"); msg2.setRecipient("4787654321"); msg2.setText("Hello world2!"); // initialize message list List<TextMessage> msgs = new ArrayList<>(); msgs.add(msg1); msgs.add(msg2); // send sender.sendTextMessages("username","password", msgs);