Rev 8 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8 | Rev 9 | ||
---|---|---|---|
1 | package de.viathinksoft.utils.mail; |
1 | package de.viathinksoft.utils.mail; |
2 | 2 | ||
3 | /** |
3 | /** |
4 | * This class contains a function which "preproceses an email address. Following |
4 | * This class contains a function which "preproceses an email address. Following |
5 | * steps will be performed: 1. The email address will be trimmed (in case of |
5 | * steps will be performed: 1. The email address will be trimmed (in case of |
6 | * user inputs) 2. E-Mail-Addresses with internationalized domain names will be |
6 | * user inputs) 2. E-Mail-Addresses with internationalized domain names will be |
7 | * converted into ASCII compatible punycode (the local part will be left as it |
7 | * converted into ASCII compatible punycode (the local part will be left as it |
8 | * is!) |
8 | * is!) |
9 | * |
9 | * |
10 | * @author Daniel Marschall |
10 | * @author Daniel Marschall |
11 | * |
11 | * |
12 | */ |
12 | */ |
13 | public class EMailPreprocessor { |
13 | public class EMailPreprocessor { |
14 | 14 | ||
15 | public static String preprocess(String eMailAddress) throws InvalidMailAddressException { |
15 | public static String preprocess(String eMailAddress) { |
16 | EMailAddress email = new EMailAddress(eMailAddress); |
16 | EMailAddress email = new EMailAddress(eMailAddress); |
17 | 17 | ||
18 | return email.getMailAddressPunycodedDomain(); |
18 | return email.getMailAddressPunycodedDomain(); |
19 | } |
19 | } |
20 | 20 | ||
21 | private EMailPreprocessor() { |
21 | private EMailPreprocessor() { |
22 | } |
22 | } |
23 | 23 | ||
24 | } |
24 | } |
25 | 25 |