Rev 17 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17 | Rev 24 | ||
---|---|---|---|
Line 310... | Line 310... | ||
310 | if (str == null) { |
310 | if (str == null) { |
311 | return false; |
311 | return false; |
312 | } |
312 | } |
313 | return (!IDN.toUnicode(str).equals(str)); |
313 | return (!IDN.toUnicode(str).equals(str)); |
314 | } |
314 | } |
- | 315 | ||
- | 316 | /** |
|
- | 317 | * This function "preproceses" an email address. Therefore following steps |
|
- | 318 | * will be performed: 1. The email address will be trimmed (in case of user |
|
- | 319 | * inputs) 2. E-Mail-Addresses with internationalized domain names will be |
|
- | 320 | * converted into ASCII compatible punycode (the local part will be left as |
|
- | 321 | * it is!) |
|
- | 322 | * |
|
- | 323 | * @author Daniel Marschall |
|
- | 324 | * |
|
- | 325 | */ |
|
- | 326 | public static String preprocess(String eMailAddress) { |
|
- | 327 | EMailAddress email = new EMailAddress(eMailAddress); |
|
- | 328 | ||
- | 329 | return email.getMailAddressPunycodedDomain(); |
|
- | 330 | } |
|
315 | } |
331 | } |