public boolean send(String number, String message) {

        String address = "sms://" + number + ":" + smsPort;

        MessageConnection smsconn = null;

        try {
            System.out.println("address: " + address);
            System.out.println("Msg :" + message);
            /** Open the message connection. */
            smsconn = (MessageConnection) Connector.open (address);

            TextMessage txtmessage = (TextMessage) smsconn.newMessage (MessageConnection.TEXT_MESSAGE);
            txtmessage.setAddress (address);
            txtmessage.setPayloadText (message);
            smsconn.send (txtmessage);
            //System.out.println("txtmessage: " + txtmessage);
        }
        catch (Throwable t) {
            System.out.println ("Send caught: ");
            t.printStackTrace ();
            return false;
        }

        if (smsconn != null) {
            try {
                smsconn.close ();
            }
            catch (IOException ioe) {
                System.out.println ("Closing connection caught: ");
                ioe.printStackTrace ();
            }
        }
        return true;
    }