Class SmtpServerBuilder


  • public class SmtpServerBuilder
    extends java.lang.Object
    Helper to build a new SmtpServer.
    • Constructor Detail

      • SmtpServerBuilder

        public SmtpServerBuilder()
    • Method Detail

      • withPort

        public SmtpServerBuilder withPort​(int port)
        Defines the port on which the SmtpServer will listen to. If the port is undefined, the server will make a dynamic lookup when it is started.
        Parameters:
        port - The port.
        Returns:
        This builder.
        See Also:
        SmtpServer(int)
      • build

        public SmtpServer build()
        Builds the SmtpServer.
        Returns:
        A new SmtpServer instance.
      • start

        public SmtpServer start()
                         throws java.io.IOException
        Builds the SmtpServer and starts it.
        Returns:
        A new SmtpServer instance.
        Throws:
        java.io.IOException