home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{E5DC7841-F5DC-11D1-8BC8-008048FD3EC9}#1.0#0"; "KSMTPSrv.ocx"
- Begin VB.Form MainForm
- BorderStyle = 1 'Fixed Single
- Caption = "SMTP Server Demo"
- ClientHeight = 2445
- ClientLeft = 2145
- ClientTop = 2505
- ClientWidth = 5580
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2445
- ScaleWidth = 5580
- Begin KSMTPSRV.SMTPServer SMTPServer1
- Left = 60
- Top = 240
- _ExtentX = 714
- _ExtentY = 714
- End
- Begin VB.CheckBox chkSaveMail
- Alignment = 1 'Right Justify
- Caption = "Save E-Mail as File:"
- Height = 195
- Left = 240
- TabIndex = 18
- Top = 1680
- Value = 1 'Checked
- Width = 1695
- End
- Begin VB.TextBox txtTimeout
- Height = 285
- Left = 1740
- TabIndex = 17
- Text = "20"
- Top = 1320
- Width = 315
- End
- Begin VB.TextBox txtIPAdress
- Height = 285
- Left = 1740
- TabIndex = 15
- Top = 1020
- Width = 1755
- End
- Begin VB.CommandButton Command3
- Caption = "About"
- Height = 255
- Left = 4560
- TabIndex = 13
- Top = 1740
- Width = 735
- End
- Begin VB.TextBox txtMaxConnect
- Height = 285
- Left = 1740
- TabIndex = 12
- Text = "10"
- Top = 720
- Width = 1755
- End
- Begin VB.CommandButton Command2
- Caption = "Stop"
- Height = 255
- Left = 4560
- TabIndex = 10
- Top = 1320
- Width = 735
- End
- Begin VB.CommandButton Command1
- Caption = "Start"
- Height = 255
- Left = 4560
- TabIndex = 9
- Top = 1020
- Width = 735
- End
- Begin VB.Frame Frame1
- Caption = "Status:"
- Height = 795
- Left = 4320
- TabIndex = 4
- Top = 60
- Width = 1215
- Begin VB.Label txtServer
- Caption = "Down"
- Height = 255
- Left = 660
- TabIndex = 8
- Top = 480
- Width = 435
- End
- Begin VB.Label txtOnline
- Caption = "0"
- Height = 195
- Left = 660
- TabIndex = 7
- Top = 240
- Width = 255
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "Server:"
- Height = 195
- Left = 120
- TabIndex = 6
- Top = 480
- Width = 510
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "Online:"
- Height = 195
- Left = 120
- TabIndex = 5
- Top = 240
- Width = 495
- End
- End
- Begin VB.TextBox txtPort
- Height = 285
- Left = 1740
- TabIndex = 3
- Text = "25"
- Top = 420
- Width = 315
- End
- Begin VB.TextBox txtSaveMailPath
- Height = 285
- Left = 1740
- TabIndex = 1
- Text = "C:\"
- Top = 120
- Width = 1755
- End
- Begin VB.Label statuslabel
- Height = 195
- Left = 360
- TabIndex = 19
- Top = 2220
- Width = 4875
- End
- Begin VB.Label Label7
- AutoSize = -1 'True
- Caption = "Timeout:"
- Height = 195
- Left = 1080
- TabIndex = 16
- Top = 1380
- Width = 615
- End
- Begin VB.Label Label6
- Caption = "IP Adress:"
- Height = 195
- Left = 960
- TabIndex = 14
- Top = 1080
- Width = 735
- End
- Begin VB.Label Label5
- Caption = "Max. Connections:"
- Height = 195
- Left = 360
- TabIndex = 11
- Top = 780
- Width = 1335
- End
- Begin VB.Label Label2
- Caption = "Port:"
- Height = 195
- Left = 1320
- TabIndex = 2
- Top = 480
- Width = 375
- End
- Begin VB.Label Label1
- Caption = "Save Mail in:"
- Height = 195
- Left = 780
- TabIndex = 0
- Top = 180
- Width = 915
- End
- Attribute VB_Name = "MainForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- SMTPServer1.MaxConnection = Val(txtMaxConnect)
- SMTPServer1.ServerPort = Val(txtPort)
- SMTPServer1.IncommingPath = txtSaveMailPath
- SMTPServer1.Timeout = Val(txtTimeout)
- SMTPServer1.LocalIP = txtIPAdress
- SMTPServer1.SaveMessage = chkSaveMail.Value
- txtSaveMailPath.Enabled = False
- txtPort.Enabled = False
- txtMaxConnect.Enabled = False
- txtIPAdress.Enabled = False
- txtTimeout.Enabled = False
- chkSaveMail.Enabled = False
- SMTPServer1.ServerListen
- End Sub
- Private Sub Command2_Click()
- SMTPServer1.ServerClose
- txtSaveMailPath.Enabled = True
- txtPort.Enabled = True
- txtMaxConnect.Enabled = True
- txtIPAdress.Enabled = True
- txtTimeout.Enabled = True
- chkSaveMail.Enabled = True
- End Sub
- Private Sub Command3_Click()
- SMTPServer1.ShowAbout
- End Sub
- Private Sub SMTPServer1_Connections(Sessions As Integer)
- txtOnline = Str(Sessions)
- End Sub
- Private Sub SMTPServer1_NewMailData(MsgFrom As Variant, MsgTo As Variant, MsgBody As String)
- MsgBox "Event NewMailData"
- End Sub
- Private Sub SMTPServer1_NewMailFile(FileName As String)
- statuslabel.Caption = "New Mail saved as: " + FileName
- End Sub
- Private Sub SMTPServer1_Shutdown()
- txtServer.Caption = "Down"
- End Sub
- Private Sub SMTPServer1_Startup()
- txtServer.Caption = "Up"
- End Sub
-