List of usage examples for org.apache.commons.mail MultiPartEmail setSSLCheckServerIdentity
public Email setSSLCheckServerIdentity(final boolean sslCheckServerIdentity)
From source file:eu.ggnet.dwoss.mandator.api.value.Mandator.java
/** * Prepares a eMail to be send direct over the mandator smtp configuration. * The email is missing: to, subject, message and optional attachments. * * @return the email// w w w . j a v a 2 s . c om * @throws EmailException if something is wrong in the subsystem. */ public MultiPartEmail prepareDirectMail() throws EmailException { MultiPartEmail email = new MultiPartEmail(); email.setHostName(smtpConfiguration.getHostname()); email.addBcc(company.getEmail()); email.setFrom(company.getEmail(), company.getEmailName()); email.setAuthentication(smtpConfiguration.getSmtpAuthenticationUser(), smtpConfiguration.getSmtpAuthenticationPass()); email.setStartTLSEnabled(false); email.setSSLCheckServerIdentity(false); email.setSSLOnConnect(false); email.setCharset(smtpConfiguration.getCharset()); return email; }