Start() public static method

Starts this instance.
public static Start ( ) : SimpleSmtpServer
return SimpleSmtpServer
Ejemplo n.º 1
0
 /// <summary>
 /// Starts server listening to the specified port with a simulated delay when processing a new SMTP message.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="processingDelayInMilliseconds">The number of milliseconds to wait before processing a new SMTP message</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port, int processingDelayInMilliseconds)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure()
                                   .WithPort(port)
                                   .WithProcessingDelay(processingDelayInMilliseconds)
                                   ));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Builds this instance.
        /// </summary>
        /// <returns></returns>
        public SimpleSmtpServer Build()
        {
            Configuration config = this;

            if (this.Port == 0)
            {
                config = this.WithRandomPort();
            }
            return(SimpleSmtpServer.Start(config));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Starts the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="useMessageStore">if set to <c>true</c> [use message store].</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port, bool useMessageStore)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithPort(port).EnableMessageStore(useMessageStore)));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Starts server listening to the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port)
 {
     return(SimpleSmtpServer.Start(port, true));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Starts the specified use message store.
 /// </summary>
 /// <param name="useMessageStore">if set to <c>true</c> [use message store].</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(bool useMessageStore)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithRandomPort().EnableMessageStore(useMessageStore)));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Starts this instance.
 /// </summary>
 /// <returns></returns>
 public static SimpleSmtpServer Start()
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithRandomPort()));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Starts server listening to the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithPort(port)));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Starts the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="useMessageStore">if set to <c>true</c> [use message store].</param>
 /// <param name="processingDelayInMilliseconds">The number of milliseconds to wait before processing a new SMTP message</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port, bool useMessageStore, int processingDelayInMilliseconds)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithPort(port).EnableMessageStore(useMessageStore).WithProcessingDelay(processingDelayInMilliseconds)));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Starts the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="useMessageStore">if set to <c>true</c> [use message store].</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port, bool useMessageStore)
 {
     return(SimpleSmtpServer.Start(port, useMessageStore, 0));
 }