private void validate ( Entity entity ) { MailSettingsImpl mailSettings = new MailSettingsImpl ( entity ) ; if ( mailSettings . isTestConnection ( ) && mailSettings . getUsername ( ) != null && mailSettings . getPassword ( ) != null ) { mailSenderFactory . validateConnection ( mailSettings ) ; } }
Validates MailSettings .