Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ public void configureEncryption(ConnectorProperties connectorProperties, Email e
if ("SSL".equalsIgnoreCase(props.getEncryption())) {
email.setSSLOnConnect(true);
email.setSslSmtpPort(props.getSmtpPort());
email.setSSLCheckServerIdentity(true);
} else if ("TLS".equalsIgnoreCase(props.getEncryption())) {
email.setStartTLSEnabled(true);
email.setSSLCheckServerIdentity(true);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1660,8 +1660,10 @@ public ConnectionTestResponse sendTestEmail(Properties properties) throws Except
if ("SSL".equalsIgnoreCase(encryption)) {
email.setSSLOnConnect(true);
email.setSslSmtpPort(portString);
email.setSSLCheckServerIdentity(true);
} else if ("TLS".equalsIgnoreCase(encryption)) {
email.setStartTLSEnabled(true);
email.setSSLCheckServerIdentity(true);
}

if (authentication) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ public void send(String toList, String ccList, String from, String subject, Stri

if (StringUtils.equalsIgnoreCase(secure, "TLS")) {
email.setStartTLSEnabled(true);
email.setSSLCheckServerIdentity(true);
} else if (StringUtils.equalsIgnoreCase(secure, "SSL")) {
email.setSSLOnConnect(true);
email.setSslSmtpPort(port);
email.setSSLCheckServerIdentity(true);
}

// These have to be set after the authenticator, so that a new mail session isn't created
Expand Down
Loading