docs: public Properties configureJavaMailSessionProperties(Properties properties, boolean debug) {
          Properties props = new Properties();
  
          if (debug) {
              props.setProperty("mail.debug", "true");
  //            System.setProperty("mail.socket.debug", "true");
          }
  
          // Set local host address (makes tests much faster. If this is not set java mail always looks for the address)
          props.setProperty(MAIL_DOT + getProtocol() + ".localaddress", String.valueOf(ServerSetup.getLocalHostAddress()));
          props.setProperty(MAIL_DOT + getProtocol() + ".port", String.valueOf(getPort()));
          props.setProperty(MAIL_DOT + getProtocol() + ".host", String.valueOf(getBindAddress()));
  
          if (isSecure()) {
              props.put(MAIL_DOT + getProtocol() + ".starttls.enable", Boolean.TRUE);
              props.setProperty(MAIL_DOT + getProtocol() + ".socketFactory.class", DummySSLSocketFactory.class.getName());
              props.setProperty(MAIL_DOT + getProtocol() + ".socketFactory.fallback", "false");
          }
  
          // Timeouts
          props.setProperty(MAIL_DOT + getProtocol() + ".connectiontimeout",
                  Long.toString(getConnectionTimeout() < 0L ? ServerSetup.CONNECTION_TIMEOUT : getConnectionTimeout()));
          props.setProperty(MAIL_DOT + getProtocol() + ".timeout",
                  Long.toString(getReadTimeout() < 0L ? ServerSetup.READ_TIMEOUT : getReadTimeout()));
          // Note: "mail." + setup.getProtocol() + ".writetimeout" breaks TLS/SSL Dummy Socket and makes tests run 6x slower!!!
          //       Therefore we do not by default configure writetimeout.
          if (getWriteTimeout() >= 0L) {
              props.setProperty(MAIL_DOT + getProtocol() + ".writetimeout", Long.toString(getWriteTimeout()));
          }
  
          // Protocol specific extensions
          if (getProtocol().startsWith(PROTOCOL_SMTP)) {
              props.setProperty("mail.transport.protocol", getProtocol());
              props.setProperty("mail.transport.protocol.rfc822", getProtocol());
          }
  
          // Auto configure stores.
          props.setProperty("mail.store.protocol", getProtocol());
  
          // Merge with optional additional properties
          if (null != properties && !properties.isEmpty()) {
              props.putAll(properties);
          }
  
          return props;
      }