break;
case PROVIDED:
String mailLookupClass = config.getMailLookupClass();
String jndi;
if (mailLookupClass != null) {
Lookup lookup;
try {
lookup = (Lookup) Class.forName(mailLookupClass).newInstance();
} catch (Exception e) {
throw new MailException("Error in mail lookup class configuration: " + mailLookupClass, e);
}
jndi = lookup.getMailName();
} else {
jndi = Lookup.DEFAULT_MAIL_NAME;
}
try {