// Extract the server and the port if the syntax server:port is used
int indexPort = mxEntry.indexOf(":");
if (indexPort >= 0) {
try {
port = Integer.parseInt(mxEntry.substring(indexPort+1));
}
catch( Exception e ) {
System.out.println("Invalid defaultsmtpserver port: "+mxEntry.substring(indexPort+1)+" - "+e);
}
if (indexPort==0) {