public void setPort(int port) {
        if (port < 0) {
            throw new IllegalArgumentException("Invalid port value: " + port);
        }
        this.port = port;
        JiveGlobals.setProperty("mail.smtp.port", Integer.toString(port));
        session = null;
    }
Sets the port number that will be used when connecting to the SMTP
server. The default is 25, the standard SMTP port number.

@param port the SMTP port number.
xmppserver/src/main/java/org/jivesoftware/util/EmailService.java