Example usage for org.apache.commons.mail Email setSSL

List of usage examples for org.apache.commons.mail Email setSSL

Introduction

In this page you can find the example usage for org.apache.commons.mail Email setSSL.

Prototype

@Deprecated
public void setSSL(final boolean ssl) 

Source Link

Document

Sets whether SSL/TLS encryption should be enabled for the SMTP transport upon connection (SMTPS/POPS).

Usage

From source file:org.yestech.notify.deliver.EmailDelivery.java

protected void enableAuthenticator(Email email) {
    if (isSsl()) {
        email.setSSL(true);
    }//from   www .  j av a2  s. com
    if (isTls()) {
        email.setTLS(true);
    }
    if (StringUtils.isNotBlank(getAuthenticatorUserName())
            && StringUtils.isNotBlank(getAuthenticatorPassword())) {
        email.setAuthentication(getAuthenticatorUserName(), getAuthenticatorPassword());
    }
}