code: @SuppressWarnings("rawtypes")
      public static FutureResult create(Throwable t) {
          final SMTPException exception;
          if (t instanceof SMTPException) {
              exception = (SMTPException) t;
          } else if (t instanceof ConnectException) {
              exception = new SMTPConnectionException(t);
          } else {
              exception = new SMTPException("Exception while try to deliver msg", t);
          }
          return new FutureResult(exception) {
  
              @Override
              public Object getResult() {
                  return null;
              }
              
          };
          
      }
docs: Create a new {@link FutureResult} by taking care to wrap or cast the given {@link Throwable} to the right {@link SMTPException}
  
  @param t
  @return result