org.mule.providers.email
Class MailUtils

java.lang.Object
  extended byorg.mule.providers.email.MailUtils

public class MailUtils
extends Object

Contains javax.mail.Session helpers.


Field Summary
protected static Log logger
          The logger used for this class
 
Constructor Summary
MailUtils()
           
 
Method Summary
static Session createMailSession(URLName url, MailConnector connector)
          Creates a new Mail session based on a Url.
static String internetAddressesToString(InternetAddress[] addresses)
           
static String mailAddressesToString(Address[] addresses)
           
static InternetAddress[] stringToInternetAddresses(String address)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
The logger used for this class

Constructor Detail

MailUtils

public MailUtils()
Method Detail

createMailSession

public static Session createMailSession(URLName url,
                                        MailConnector connector)
Creates a new Mail session based on a Url. this method will also add an Smtp Authenticator if a password is set on the URL

Parameters:
url -
Returns:
initialised mail session

internetAddressesToString

public static String internetAddressesToString(InternetAddress[] addresses)

mailAddressesToString

public static String mailAddressesToString(Address[] addresses)

stringToInternetAddresses

public static InternetAddress[] stringToInternetAddresses(String address)
                                                   throws AddressException
Throws:
AddressException


Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.