railo.runtime.net.mail
Class MailUtil

java.lang.Object
  extended by railo.runtime.net.mail.MailUtil

public final class MailUtil
extends Object


Constructor Summary
MailUtil()
           
 
Method Summary
static String decode(String text)
           
static String encode(String text, String encoding)
           
static void fixIDN(javax.mail.internet.InternetAddress addr)
          converts IDN to ASCII if needed
static boolean isValidEmail(Object value)
          returns true if the passed value is a in valid email address format
static javax.mail.internet.InternetAddress parseEmail(Object value)
          returns an InternetAddress object or null if the parsing fails.
static javax.mail.internet.InternetAddress toInternetAddress(Object emails)
           
static javax.mail.internet.InternetAddress[] toInternetAddresses(Object emails)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailUtil

public MailUtil()
Method Detail

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