railo.runtime.net.mail
Class MailUtil
java.lang.Object
railo.runtime.net.mail.MailUtil
public final class MailUtil
- extends Object
MailUtil
public MailUtil()
encode
public static String encode(String text,
String encoding)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
decode
public static String decode(String text)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
toInternetAddress
public static javax.mail.internet.InternetAddress toInternetAddress(Object emails)
throws MailException,
UnsupportedEncodingException,
PageException
- Throws:
MailException
UnsupportedEncodingException
PageException
toInternetAddresses
public static javax.mail.internet.InternetAddress[] toInternetAddresses(Object emails)
throws MailException,
UnsupportedEncodingException,
PageException
- Throws:
MailException
UnsupportedEncodingException
PageException
isValidEmail
public static boolean isValidEmail(Object value)
- returns true if the passed value is a in valid email address format
- Parameters:
value
-
- Returns:
parseEmail
public static javax.mail.internet.InternetAddress parseEmail(Object value)
- returns an InternetAddress object or null if the parsing fails. to be be used in multiple places.
- Parameters:
value
-
- Returns:
fixIDN
public static void fixIDN(javax.mail.internet.InternetAddress addr)
- converts IDN to ASCII if needed
- Parameters:
addr
-
Copyright © 2012 Railo