public Response onCommand(SMTPSession session,Request request){
  if (session.isStartTLSSupported()) {
    if (session.isTLSStarted()) {
      return TLS_ALREADY_ACTIVE;
    }
 else {
      String parameters=request.getArgument();
      if ((parameters == null) || (parameters.length() == 0)) {
        return READY_FOR_STARTTLS;
      }
 else {
        return SYNTAX_ERROR;
      }
    }
  }
 else {
    return NOT_SUPPORTED;
  }
}

public Response onCommand ( SMTPSession session , Request request ) { if ( session . isStartTLSSupported ( ) ) { if ( session . isTLSStarted ( ) ) { return TLS_ALREADY_ACTIVE ; } else { String parameters = request . getArgument ( ) ; if ( ( parameters == null ) || ( parameters . length ( ) == 0 ) ) { return READY_FOR_STARTTLS ; } else { return SYNTAX_ERROR ; } } } else { return NOT_SUPPORTED ; } }
handler method called upon receipt of a starttls command . resets message - specific , but not authenticated user , state .
