home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / esmail01 / form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-01-08  |  7.6 KB  |  273 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   5295
  5.    ClientLeft      =   510
  6.    ClientTop       =   1740
  7.    ClientWidth     =   11040
  8.    Height          =   5760
  9.    Left            =   450
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   5295
  12.    ScaleWidth      =   11040
  13.    Top             =   1335
  14.    Width           =   11160
  15.    Begin VB.CommandButton Command10 
  16.       Caption         =   "Enumerate"
  17.       Height          =   375
  18.       Left            =   3120
  19.       TabIndex        =   17
  20.       Top             =   4680
  21.       Width           =   1575
  22.    End
  23.    Begin VB.CommandButton Command9 
  24.       Caption         =   "Reset"
  25.       Height          =   375
  26.       Left            =   4800
  27.       TabIndex        =   16
  28.       Top             =   4200
  29.       Width           =   1575
  30.    End
  31.    Begin VB.CommandButton Command8 
  32.       Caption         =   "Delete"
  33.       Height          =   375
  34.       Left            =   3120
  35.       TabIndex        =   14
  36.       Top             =   4200
  37.       Width           =   1575
  38.    End
  39.    Begin VB.TextBox msgno 
  40.       Height          =   285
  41.       Left            =   5880
  42.       TabIndex        =   13
  43.       Text            =   "1"
  44.       Top             =   3720
  45.       Width           =   495
  46.    End
  47.    Begin VB.TextBox Text3 
  48.       Height          =   4575
  49.       Left            =   6480
  50.       MultiLine       =   -1  'True
  51.       TabIndex        =   9
  52.       Text            =   "Form1.frx":0000
  53.       Top             =   240
  54.       Width           =   4455
  55.    End
  56.    Begin VB.CommandButton Command7 
  57.       Caption         =   "Getmail"
  58.       Height          =   375
  59.       Left            =   3120
  60.       TabIndex        =   8
  61.       Top             =   3720
  62.       Width           =   1575
  63.    End
  64.    Begin VB.CommandButton Command6 
  65.       Caption         =   "List"
  66.       Height          =   375
  67.       Left            =   4800
  68.       TabIndex        =   7
  69.       Top             =   3240
  70.       Width           =   1575
  71.    End
  72.    Begin VB.CommandButton Command5 
  73.       Caption         =   "Status"
  74.       Height          =   375
  75.       Left            =   3120
  76.       TabIndex        =   6
  77.       Top             =   3240
  78.       Width           =   1575
  79.    End
  80.    Begin VB.TextBox Text2 
  81.       Height          =   285
  82.       Left            =   360
  83.       TabIndex        =   5
  84.       Text            =   "Text2"
  85.       Top             =   4320
  86.       Width           =   1935
  87.    End
  88.    Begin VB.TextBox Text1 
  89.       Height          =   285
  90.       Left            =   360
  91.       TabIndex        =   4
  92.       Text            =   "Text1"
  93.       Top             =   3720
  94.       Width           =   1935
  95.    End
  96.    Begin VB.CommandButton Command4 
  97.       Caption         =   "LogOff"
  98.       Height          =   375
  99.       Left            =   4800
  100.       TabIndex        =   3
  101.       Top             =   2760
  102.       Width           =   1575
  103.    End
  104.    Begin VB.CommandButton Command3 
  105.       Caption         =   "LogOn"
  106.       Height          =   375
  107.       Left            =   3120
  108.       TabIndex        =   2
  109.       Top             =   2760
  110.       Width           =   1575
  111.    End
  112.    Begin VB.CommandButton Command2 
  113.       Caption         =   "Add Attachment..."
  114.       Height          =   495
  115.       Left            =   2880
  116.       TabIndex        =   1
  117.       Top             =   1200
  118.       Width           =   2775
  119.    End
  120.    Begin VB.CommandButton Command1 
  121.       Caption         =   "SendMail"
  122.       Height          =   375
  123.       Left            =   3120
  124.       TabIndex        =   0
  125.       Top             =   480
  126.       Width           =   2175
  127.    End
  128.    Begin VB.Label Label3 
  129.       Alignment       =   1  'Right Justify
  130.       Caption         =   "Message No:"
  131.       Height          =   255
  132.       Left            =   4800
  133.       TabIndex        =   15
  134.       Top             =   3720
  135.       Width           =   975
  136.    End
  137.    Begin VB.Line Line1 
  138.       X1              =   6360
  139.       X2              =   120
  140.       Y1              =   2040
  141.       Y2              =   2040
  142.    End
  143.    Begin VB.Label Label2 
  144.       Caption         =   "Total Size"
  145.       Height          =   255
  146.       Left            =   360
  147.       TabIndex        =   12
  148.       Top             =   4080
  149.       Width           =   1935
  150.    End
  151.    Begin VB.Label Label1 
  152.       Caption         =   "# of Messages"
  153.       Height          =   255
  154.       Left            =   360
  155.       TabIndex        =   11
  156.       Top             =   3480
  157.       Width           =   1935
  158.    End
  159.    Begin ComctlLib.ProgressBar ProgressBar1 
  160.       Height          =   255
  161.       Left            =   3240
  162.       TabIndex        =   10
  163.       Top             =   2400
  164.       Width           =   2895
  165.       _Version        =   65536
  166.       _ExtentX        =   5106
  167.       _ExtentY        =   450
  168.       _StockProps     =   192
  169.       Appearance      =   1
  170.    End
  171.    Begin EsmailLibCtl.EsPop EsPop1 
  172.       Left            =   480
  173.       Top             =   2760
  174.       _version        =   65536
  175.       _extentx        =   2566
  176.       _extenty        =   1085
  177.       _stockprops     =   0
  178.    End
  179.    Begin EsmailLibCtl.EsSmtp EsSmtp1 
  180.       Left            =   360
  181.       Top             =   360
  182.       _version        =   65536
  183.       _extentx        =   3201
  184.       _extenty        =   873
  185.       _stockprops     =   0
  186.    End
  187. Attribute VB_Name = "Form1"
  188. Attribute VB_Creatable = False
  189. Attribute VB_Exposed = False
  190. Option Explicit
  191. Private Sub Command1_Click()
  192.     EsSmtp1.DestinationAddress = "root"
  193.     EsSmtp1.Domain = "eurosource.se"
  194.     EsSmtp1.MailData = "Detta 
  195. r ett testmeddelande som inneh
  196. ller b
  197.  och en massa andra tecken. Framf
  198. rallt s
  199. r det l
  200. ngre 
  201. n den stipulerade l
  202. ngd som g
  203. ller f
  204. r meddelanden. Hoppas att detta skall fungera som det 
  205. nkt och inte s
  206. tta en massa k
  207. ppar i hjulet f
  208. r den process som detta 
  209.     EsSmtp1.SmtpServerIP = "194.17.255.4"
  210.     EsSmtp1.SourceAddress = "oxygen"
  211.     EsSmtp1.SourceMailer = "ESSMTP test-mailer"
  212.     EsSmtp1.SourceName = "
  213. ke Hedman"
  214.     EsSmtp1.Subject = "Test av SMTP mailer with 
  215.     If (EsSmtp1.SendMail = 1) Then
  216.         MsgBox "OK"
  217.     Else
  218.         MsgBox "Failed " + Str$(EsSmtp1.ErrorNo)
  219.     End If
  220. End Sub
  221. Private Sub Command10_Click()
  222.     EsPop1.EnumContent
  223. End Sub
  224. Private Sub Command2_Click()
  225.     Dim file As String
  226.     file = InputBox("Path to file:")
  227.     EsSmtp1.AddAttachment file, 0
  228. End Sub
  229. Private Sub Command3_Click()
  230.     EsPop1.POPServerIP = "194.17.255.4"
  231.     EsPop1.UserName = "test"
  232.     EsPop1.Password = "test"
  233.     If (EsPop1.LogOn) Then
  234.         Text1.Text = Str$(EsPop1.NumOfMsg)
  235.         Text2.Text = Str$(EsPop1.TotMsgSize)
  236.     Else
  237.         MsgBox "Fail!!!"
  238.     End If
  239. End Sub
  240. Private Sub Command4_Click()
  241.     If (Not EsPop1.LogOff) Then
  242.         MsgBox "Fail!!!"
  243.     End If
  244. End Sub
  245. Private Sub Command5_Click()
  246.     MsgBox "|" + EsPop1.GetMailStatus + "|"
  247. End Sub
  248. Private Sub Command6_Click()
  249.     MsgBox EsPop1.GetMailList
  250. End Sub
  251. Private Sub Command7_Click()
  252.     If (Not EsPop1.GetMail(Val(msgno.Text))) Then
  253.         MsgBox "Fail...."
  254.         Text3.Text = "Failure....."
  255.     Else
  256.         Text3.Text = EsPop1.Message
  257.     End If
  258. End Sub
  259. Private Sub Command8_Click()
  260.     If (Not EsPop1.DeleteMail(Val(msgno))) Then
  261.         MsgBox "Fail...."
  262.     Else
  263.         Text1.Text = Str$(EsPop1.NumOfMsg)
  264.         Text2.Text = Str$(EsPop1.TotMsgSize)
  265.     End If
  266. End Sub
  267. Private Sub Command9_Click()
  268.     EsPop1.Reset
  269. End Sub
  270. Private Sub EsPop1_Status(ByVal progress As Integer)
  271.     ProgressBar1.Value = progress
  272. End Sub
  273.