if (getHandler() != null) {
getHandler().prepareConnection(transport);
}
} catch (NoSuchProviderException e) {
transport = null;
throw new MailException("Could not find a provider of " + getProtocol() + " protocol", e);
} catch (MessagingException me) {
transport = null;
throw new MailException("Could not connect to the transport", me);
}
}
}