code: public static String fixIDN(String addr) {
  	int pos = addr.indexOf('@');
  	if (pos > 0 && pos < addr.length() - 1) {
  	    String domain = addr.substring(pos + 1);
  	    if (!StringUtil.isAscii(domain)) {
  		domain = IDN.toASCII(domain);
  		return addr.substring(0, pos) + "@" + domain;
  	    }
  	}
  	return addr;
      }
docs: converts IDN to ASCII if needed
  
  @param addr
  @return