public void sendImmediately( String message, String recipient ) throws Exception
    {
        if ( message == null || message.isEmpty() )
        {
            throw new IllegalArgumentException( "Argument 'message' cannot be null or an empty String." );
        }

        if ( recipient == null || recipient.isEmpty() )
        {
            throw new IllegalArgumentException( "Argument 'recipient' cannot be null or an empty String." );
        }

        try
        {
            new SmsTask( sessionPool, message, recipient ).sendMessage();
        }
        catch ( Exception e )
        {
            Log.error( "An exception occurred while sending a SMS message (to '{}')", recipient, e );
            throw e;
        }
    }
Causes a new SMS message to be sent.

This method differs from {@link #send(String, String)} in that the message is sent before this method returns,
rather than queueing the messages to be sent later (in an async fashion). As a result, any exceptions that occur
while sending the message are thrown by this method (which can be useful to test the configuration of this
service).

@param message   The body of the message (cannot be null or empty).
@param recipient The address / phone number to which the message is to be send (cannot be null or empty).
@throws Exception On any problem.
xmppserver/src/main/java/org/jivesoftware/util/SmsService.java