public SMailPostalMotorbike useStarttls() {
        if (!hasAuth) {
            throw new IllegalStateException("Not found the authenticator for STARTTLS: session=" + session);
        }
        if (MotorbikeSecurityType.SSL.equals(securityType)) {
            throw new IllegalStateException("Cannot use STARTTLS with SSL: session=" + session);
        }
        securityType = MotorbikeSecurityType.STARTTLS;
        registerSmtpAuth();
        final Properties props = session.getProperties();
        props.setProperty("mail.smtp.starttls.enable", "true");
        props.setProperty("mail.smtp.starttls.required", "true");
        return this;
    }
public SMailPostalMotorbike useStarttls ( ) { if ( ! hasAuth ) { throw new IllegalStateException ( "Not found the authenticator for STARTTLS: session=" + session ) ; } if ( MotorbikeSecurityType . SSL . equals ( securityType ) ) { throw new IllegalStateException ( "Cannot use STARTTLS with SSL: session=" + session ) ; } securityType = MotorbikeSecurityType . STARTTLS ; registerSmtpAuth ( ) ; final Properties props = session . getProperties ( ) ; props . setProperty ( "mail.smtp.starttls.enable" , "true" ) ; props . setProperty ( "mail.smtp.starttls.required" , "true" ) ; return this ; }
Motorbike uses STARTTLS. <br>
It needs authenticator, that you can specify by constructor.
<pre>
e.g.
SMailPostalMotorbike motorbike = new SMailPostalMotorbike("sea", "land").<span style="color: #CC4747">useStarttls()</span>;
motorbike.registerConnectionInfo(...);
motorbike.registerReturnPath(...);
</pre>
@return this. (NotNull)