Class SmtpServerOptions

java.lang.Object
ch.astorm.smtp4j.SmtpServerOptions

public class SmtpServerOptions extends Object
Represents options of the SmtpServer. Most of theses options can be set directly through the SmtpServerBuilder.
  • Field Details

    • debugStream

      public PrintStream debugStream
      Output for internal debugging. This stream will receive all the inputs/outputs of the underlying SMTP protocol. If null, then no debug will be printed.
    • startTLS

      public boolean startTLS
      True if the SmtpCommand.Type.STARTTLS command must be accepted. In the client sends it, it will be still unsupported.
    • requireTLS

      public boolean requireTLS
      True if the TLS secure layer must be asked once connected. This value has impact only when startTLS is set to true. If this value is true, then plain connections that do not switch to secure transport layer with STARTTLS will be rejected.
    • protocol

      public SmtpServerOptions.Protocol protocol
      The protocol to use.
    • sslContextProvider

      public SSLContextProvider sslContextProvider
      The SSLContextProvider that will provide the SSLContext to upgrade to TLS communication.
      See Also:
    • connectionString

      public String connectionString
      String reply when a client connects to smtp4j.
    • ehloResponseFunction

      public Function<String,String> ehloResponseFunction
      Function that generates the reply to the SmtpCommand.Type.EHLO command. The function input is the parameter sent by the client in the protocol and might be null.
    • maxMessageSize

      public int maxMessageSize
      The maximum message size (in bytes). A value less or equal than zero disables the message size verification. As per RFC1870, the message size is defined as the number of octets, including CR-LF pairs, but not the SMTP DATA command's terminating dot or doubled quoting dots, to be transmitted by the SMTP client after receiving reply code 354 to the DATA command.
    • authenticators

      public List<SmtpAuthenticatorHandler> authenticators
      List of SmtpAuthenticatorHandler. If this list has one item or more, an authentication will be required from the client.
    • usersRepository

      public UserRepository usersRepository
      The users repository used for the authentication.
  • Constructor Details

    • SmtpServerOptions

      public SmtpServerOptions()