if (configRequest != null) {
GlobalConfigurationResource resource = configRequest.getData();
try {
if (resource.getSmtpSettings() != null) {
SmtpSettings settings = resource.getSmtpSettings();
getNexusEmailer().setSMTPHostname(settings.getHost());
// lookup old password
String oldPassword = getNexusEmailer().getSMTPPassword();
if (settings.getPassword() == null) {
settings.setPassword("");
}
getNexusEmailer().setSMTPPassword(this.getActualPassword(settings.getPassword(), oldPassword));
getNexusEmailer().setSMTPPort(settings.getPort());
getNexusEmailer().setSMTPSslEnabled(settings.isSslEnabled());
getNexusEmailer().setSMTPTlsEnabled(settings.isTlsEnabled());
if (settings.getUsername() == null) {
settings.setUsername("");
}
getNexusEmailer().setSMTPUsername(settings.getUsername());
getNexusEmailer().setSMTPSystemEmailAddress(
new Address(settings.getSystemEmailAddress().trim()));
}
if (resource.getGlobalConnectionSettings() != null) {
RemoteConnectionSettings s = resource.getGlobalConnectionSettings();