Exemple #1
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     CleverComponents.InetSuite.MailUserAccountItem mailUserAccountItem2 = new CleverComponents.InetSuite.MailUserAccountItem();
     this.memLog           = new System.Windows.Forms.TextBox();
     this.label5           = new System.Windows.Forms.Label();
     this.btnStop          = new System.Windows.Forms.Button();
     this.btnStart         = new System.Windows.Forms.Button();
     this.edtMailboxDir    = new System.Windows.Forms.TextBox();
     this.label4           = new System.Windows.Forms.Label();
     this.edtPort          = new System.Windows.Forms.TextBox();
     this.label3           = new System.Windows.Forms.Label();
     this.label2           = new System.Windows.Forms.Label();
     this.label1           = new System.Windows.Forms.Label();
     this.cbUseLogin       = new System.Windows.Forms.CheckBox();
     this.smtpServer1      = new CleverComponents.InetSuite.SmtpServer();
     this.smtpFileHandler1 = new CleverComponents.InetSuite.SmtpFileHandler();
     this.edtRelayDir      = new System.Windows.Forms.TextBox();
     this.label6           = new System.Windows.Forms.Label();
     this.SuspendLayout();
     //
     // memLog
     //
     this.memLog.Location   = new System.Drawing.Point(0, 256);
     this.memLog.Multiline  = true;
     this.memLog.Name       = "memLog";
     this.memLog.ReadOnly   = true;
     this.memLog.ScrollBars = System.Windows.Forms.ScrollBars.Both;
     this.memLog.Size       = new System.Drawing.Size(440, 120);
     this.memLog.TabIndex   = 29;
     //
     // label5
     //
     this.label5.Location = new System.Drawing.Point(16, 236);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(48, 17);
     this.label5.TabIndex = 28;
     this.label5.Text     = "Log";
     //
     // btnStop
     //
     this.btnStop.Location = new System.Drawing.Point(172, 208);
     this.btnStop.Name     = "btnStop";
     this.btnStop.Size     = new System.Drawing.Size(75, 23);
     this.btnStop.TabIndex = 27;
     this.btnStop.Text     = "Stop";
     this.btnStop.Click   += new System.EventHandler(this.btnStop_Click);
     //
     // btnStart
     //
     this.btnStart.Location = new System.Drawing.Point(86, 208);
     this.btnStart.Name     = "btnStart";
     this.btnStart.Size     = new System.Drawing.Size(75, 23);
     this.btnStart.TabIndex = 26;
     this.btnStart.Text     = "Start";
     this.btnStart.Click   += new System.EventHandler(this.btnStart_Click);
     //
     // edtMailboxDir
     //
     this.edtMailboxDir.Location = new System.Drawing.Point(86, 116);
     this.edtMailboxDir.Name     = "edtMailboxDir";
     this.edtMailboxDir.Size     = new System.Drawing.Size(338, 20);
     this.edtMailboxDir.TabIndex = 25;
     this.edtMailboxDir.Text     = "C:\\CleverMailBox\\";
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(16, 119);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(72, 16);
     this.label4.TabIndex = 24;
     this.label4.Text     = "Mailbox Dir";
     //
     // edtPort
     //
     this.edtPort.Location = new System.Drawing.Point(86, 88);
     this.edtPort.Name     = "edtPort";
     this.edtPort.Size     = new System.Drawing.Size(75, 20);
     this.edtPort.TabIndex = 23;
     this.edtPort.Text     = "25";
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(16, 91);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(32, 23);
     this.label3.TabIndex = 22;
     this.label3.Text     = "Port";
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(16, 48);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(408, 32);
     this.label2.TabIndex = 21;
     this.label2.Text     = "Please use the \"CleverTester\" user name and \"clevertester\" password to log-in. Th" +
                            "e user e-mail: [email protected]";
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(16, 8);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(416, 29);
     this.label1.TabIndex = 20;
     this.label1.Text     = "This is a sample SMTP server. You can use any mail client with SMTP support to co" +
                            "nnect to this server.";
     //
     // cbUseLogin
     //
     this.cbUseLogin.Checked    = true;
     this.cbUseLogin.CheckState = System.Windows.Forms.CheckState.Checked;
     this.cbUseLogin.Location   = new System.Drawing.Point(86, 175);
     this.cbUseLogin.Name       = "cbUseLogin";
     this.cbUseLogin.Size       = new System.Drawing.Size(279, 24);
     this.cbUseLogin.TabIndex   = 30;
     this.cbUseLogin.Text       = "Use Authentication - LOGIN / CRAM-MD5 / NTLM";
     //
     // smtpServer1
     //
     this.smtpServer1.HelpText = new string[] {
         "Commands Supported:",
         "HELO EHLO AUTH HELP QUIT MAIL NOOP RSET RCPT DATA STARTTLS"
     };
     this.smtpServer1.ServerName      = "Clever Internet Suite SMTP service";
     mailUserAccountItem2.DisplayName = "Clever Tester";
     mailUserAccountItem2.Email       = "*****@*****.**";
     mailUserAccountItem2.Password    = "******";
     mailUserAccountItem2.UserName    = "******";
     this.smtpServer1.UserAccounts.AddRange(new CleverComponents.InetSuite.UserAccountItem[] {
         mailUserAccountItem2
     });
     this.smtpServer1.Authenticate       += new CleverComponents.InetSuite.SmtpAuthenticateEventHandler(this.smtpServer1_Authenticate);
     this.smtpServer1.CommandReceived    += new CleverComponents.InetSuite.TcpCommandEventHandler(this.smtpServer1_CommandReceived);
     this.smtpServer1.ResponseSent       += new CleverComponents.InetSuite.TcpResponseEventHandler(this.smtpServer1_ResponseSent);
     this.smtpServer1.Started            += new System.EventHandler(this.smtpServer1_Started);
     this.smtpServer1.Stopped            += new System.EventHandler(this.smtpServer1_Stopped);
     this.smtpServer1.ConnectionAccepted += new CleverComponents.InetSuite.ConnectionAcceptedEventHandler(this.smtpServer1_ConnectionAccepted);
     this.smtpServer1.ConnectionClosed   += new CleverComponents.InetSuite.ConnectionEventHandler(this.smtpServer1_ConnectionClosed);
     //
     // smtpFileHandler1
     //
     this.smtpFileHandler1.Counter    = 1;
     this.smtpFileHandler1.MailBoxDir = null;
     this.smtpFileHandler1.RelayDir   = null;
     this.smtpFileHandler1.Server     = this.smtpServer1;
     //
     // edtRelayDir
     //
     this.edtRelayDir.Location = new System.Drawing.Point(86, 144);
     this.edtRelayDir.Name     = "edtRelayDir";
     this.edtRelayDir.Size     = new System.Drawing.Size(338, 20);
     this.edtRelayDir.TabIndex = 32;
     this.edtRelayDir.Text     = "C:\\CleverMailBox\\RelayQueue\\";
     //
     // label6
     //
     this.label6.Location = new System.Drawing.Point(16, 147);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(56, 16);
     this.label6.TabIndex = 31;
     this.label6.Text     = "Relay Dir";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(440, 376);
     this.Controls.Add(this.edtRelayDir);
     this.Controls.Add(this.label6);
     this.Controls.Add(this.cbUseLogin);
     this.Controls.Add(this.memLog);
     this.Controls.Add(this.label5);
     this.Controls.Add(this.btnStop);
     this.Controls.Add(this.btnStart);
     this.Controls.Add(this.edtMailboxDir);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.edtPort);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Name            = "Form1";
     this.Text            = "Clever SMTP Server";
     this.Closed         += new System.EventHandler(this.Form1_Closed);
     this.Load           += new System.EventHandler(this.Form1_Load);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     CleverComponents.InetSuite.MailUserAccountItem mailUserAccountItem2 = new CleverComponents.InetSuite.MailUserAccountItem();
     this.memLog            = new System.Windows.Forms.TextBox();
     this.label5            = new System.Windows.Forms.Label();
     this.btnStop           = new System.Windows.Forms.Button();
     this.btnStart          = new System.Windows.Forms.Button();
     this.edtMailboxDir     = new System.Windows.Forms.TextBox();
     this.label4            = new System.Windows.Forms.Label();
     this.edtPort           = new System.Windows.Forms.TextBox();
     this.label3            = new System.Windows.Forms.Label();
     this.label2            = new System.Windows.Forms.Label();
     this.label1            = new System.Windows.Forms.Label();
     this.cbUseLogin        = new System.Windows.Forms.CheckBox();
     this.smtpServer1       = new CleverComponents.InetSuite.SmtpServer();
     this.smtpFileHandler1  = new CleverComponents.InetSuite.SmtpFileHandler();
     this.edtRelayDir       = new System.Windows.Forms.TextBox();
     this.label6            = new System.Windows.Forms.Label();
     this.label7            = new System.Windows.Forms.Label();
     this.cbUseTls          = new System.Windows.Forms.ComboBox();
     this.label8            = new System.Windows.Forms.Label();
     this.certificateStore1 = new CleverComponents.InetSuite.CertificateStore();
     this.SuspendLayout();
     //
     // memLog
     //
     this.memLog.Location   = new System.Drawing.Point(0, 296);
     this.memLog.Multiline  = true;
     this.memLog.Name       = "memLog";
     this.memLog.ReadOnly   = true;
     this.memLog.ScrollBars = System.Windows.Forms.ScrollBars.Both;
     this.memLog.Size       = new System.Drawing.Size(440, 112);
     this.memLog.TabIndex   = 29;
     //
     // label5
     //
     this.label5.Location = new System.Drawing.Point(16, 275);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(48, 14);
     this.label5.TabIndex = 28;
     this.label5.Text     = "Log";
     //
     // btnStop
     //
     this.btnStop.Location = new System.Drawing.Point(170, 256);
     this.btnStop.Name     = "btnStop";
     this.btnStop.Size     = new System.Drawing.Size(75, 23);
     this.btnStop.TabIndex = 27;
     this.btnStop.Text     = "Stop";
     this.btnStop.Click   += new System.EventHandler(this.btnStop_Click);
     //
     // btnStart
     //
     this.btnStart.Location = new System.Drawing.Point(83, 256);
     this.btnStart.Name     = "btnStart";
     this.btnStart.Size     = new System.Drawing.Size(75, 23);
     this.btnStart.TabIndex = 26;
     this.btnStart.Text     = "Start";
     this.btnStart.Click   += new System.EventHandler(this.btnStart_Click);
     //
     // edtMailboxDir
     //
     this.edtMailboxDir.Location = new System.Drawing.Point(83, 168);
     this.edtMailboxDir.Name     = "edtMailboxDir";
     this.edtMailboxDir.Size     = new System.Drawing.Size(341, 20);
     this.edtMailboxDir.TabIndex = 25;
     this.edtMailboxDir.Text     = "C:\\CleverMailBox\\";
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(16, 171);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(72, 16);
     this.label4.TabIndex = 24;
     this.label4.Text     = "Mailbox Dir";
     //
     // edtPort
     //
     this.edtPort.Location = new System.Drawing.Point(83, 136);
     this.edtPort.Name     = "edtPort";
     this.edtPort.Size     = new System.Drawing.Size(72, 20);
     this.edtPort.TabIndex = 23;
     this.edtPort.Text     = "25";
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(16, 138);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(32, 17);
     this.label3.TabIndex = 22;
     this.label3.Text     = "Port";
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(16, 96);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(408, 32);
     this.label2.TabIndex = 21;
     this.label2.Text     = "Please use the \"CleverTester\" user name and \"clevertester\" password to log-in. Th" +
                            "e user e-mail: [email protected]";
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(16, 8);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(416, 29);
     this.label1.TabIndex = 20;
     this.label1.Text     = "This is a sample SMTP SSL / TLS server. You can use any SSL-enabled SMTP client (" +
                            "such as TclSmtp or MS Outlook client to connect to this server.";
     //
     // cbUseLogin
     //
     this.cbUseLogin.Checked    = true;
     this.cbUseLogin.CheckState = System.Windows.Forms.CheckState.Checked;
     this.cbUseLogin.Location   = new System.Drawing.Point(83, 220);
     this.cbUseLogin.Name       = "cbUseLogin";
     this.cbUseLogin.Size       = new System.Drawing.Size(296, 24);
     this.cbUseLogin.TabIndex   = 30;
     this.cbUseLogin.Text       = "Use Authentication - LOGIN / CRAM-MD5 / NTLM";
     //
     // smtpServer1
     //
     this.smtpServer1.HelpText = new string[] {
         "Commands Supported:",
         "HELO EHLO AUTH HELP QUIT MAIL NOOP RSET RCPT DATA STARTTLS"
     };
     this.smtpServer1.ServerName      = "Clever Internet Suite SMTP service";
     mailUserAccountItem2.DisplayName = "Clever Tester";
     mailUserAccountItem2.Email       = "*****@*****.**";
     mailUserAccountItem2.Password    = "******";
     mailUserAccountItem2.UserName    = "******";
     this.smtpServer1.UserAccounts.AddRange(new CleverComponents.InetSuite.UserAccountItem[] {
         mailUserAccountItem2
     });
     this.smtpServer1.Authenticate       += new CleverComponents.InetSuite.SmtpAuthenticateEventHandler(this.smtpServer1_Authenticate);
     this.smtpServer1.CommandReceived    += new CleverComponents.InetSuite.TcpCommandEventHandler(this.smtpServer1_CommandReceived);
     this.smtpServer1.ResponseSent       += new CleverComponents.InetSuite.TcpResponseEventHandler(this.smtpServer1_ResponseSent);
     this.smtpServer1.GetCertificate     += new CleverComponents.InetSuite.GetCertificateEventHandler(this.smtpServer1_GetCertificate);
     this.smtpServer1.Started            += new System.EventHandler(this.smtpServer1_Started);
     this.smtpServer1.Stopped            += new System.EventHandler(this.smtpServer1_Stopped);
     this.smtpServer1.ConnectionAccepted += new CleverComponents.InetSuite.ConnectionAcceptedEventHandler(this.smtpServer1_ConnectionAccepted);
     this.smtpServer1.ConnectionClosed   += new CleverComponents.InetSuite.ConnectionEventHandler(this.smtpServer1_ConnectionClosed);
     //
     // smtpFileHandler1
     //
     this.smtpFileHandler1.Counter    = 1;
     this.smtpFileHandler1.MailBoxDir = null;
     this.smtpFileHandler1.RelayDir   = null;
     this.smtpFileHandler1.Server     = this.smtpServer1;
     //
     // edtRelayDir
     //
     this.edtRelayDir.Location = new System.Drawing.Point(83, 192);
     this.edtRelayDir.Name     = "edtRelayDir";
     this.edtRelayDir.Size     = new System.Drawing.Size(341, 20);
     this.edtRelayDir.TabIndex = 32;
     this.edtRelayDir.Text     = "C:\\CleverMailBox\\RelayQueue\\";
     //
     // label6
     //
     this.label6.Location = new System.Drawing.Point(16, 195);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(56, 16);
     this.label6.TabIndex = 31;
     this.label6.Text     = "Relay Dir";
     //
     // label7
     //
     this.label7.Location = new System.Drawing.Point(24, 48);
     this.label7.Name     = "label7";
     this.label7.Size     = new System.Drawing.Size(400, 40);
     this.label7.TabIndex = 33;
     this.label7.Text     = "This server uses self-signed server certificate to establish the SSL connection. " +
                            "In real application you will need to request a certificate from trusted issuer o" +
                            "r use your own self-signed certificate.";
     //
     // cbUseTls
     //
     this.cbUseTls.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cbUseTls.Items.AddRange(new object[] {
         "None",
         "Implicit",
         "Allow Explicit",
         "Require Explicit"
     });
     this.cbUseTls.Location = new System.Drawing.Point(304, 136);
     this.cbUseTls.Name     = "cbUseTls";
     this.cbUseTls.Size     = new System.Drawing.Size(121, 21);
     this.cbUseTls.TabIndex = 34;
     //
     // label8
     //
     this.label8.Location = new System.Drawing.Point(200, 139);
     this.label8.Name     = "label8";
     this.label8.Size     = new System.Drawing.Size(100, 16);
     this.label8.TabIndex = 35;
     this.label8.Text     = "SSL / TLS Mode";
     //
     // certificateStore1
     //
     this.certificateStore1.ValidFrom = new System.DateTime(2008, 8, 17, 13, 58, 6, 250);
     this.certificateStore1.ValidTo   = new System.DateTime(2009, 8, 17, 13, 58, 6, 250);
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(440, 408);
     this.Controls.Add(this.cbUseTls);
     this.Controls.Add(this.label8);
     this.Controls.Add(this.label7);
     this.Controls.Add(this.edtRelayDir);
     this.Controls.Add(this.label6);
     this.Controls.Add(this.cbUseLogin);
     this.Controls.Add(this.memLog);
     this.Controls.Add(this.label5);
     this.Controls.Add(this.btnStop);
     this.Controls.Add(this.btnStart);
     this.Controls.Add(this.edtMailboxDir);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.edtPort);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Name            = "Form1";
     this.Text            = "Clever SMTP Server";
     this.Closed         += new System.EventHandler(this.Form1_Closed);
     this.Load           += new System.EventHandler(this.Form1_Load);
     this.ResumeLayout(false);
     this.PerformLayout();
 }