home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / mailx6 / _setup.2 / Group4 / OCXSEND.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-06-08  |  4.7 KB  |  157 lines

  1. VERSION 4.00
  2. Begin VB.Form SimpleForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Send Message FROM Code"
  5.    ClientHeight    =   3705
  6.    ClientLeft      =   1230
  7.    ClientTop       =   1635
  8.    ClientWidth     =   6225
  9.    Height          =   4080
  10.    Left            =   1185
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   3705
  15.    ScaleWidth      =   6225
  16.    ShowInTaskbar   =   0   'False
  17.    Top             =   1305
  18.    Width           =   6315
  19.    Begin VB.CommandButton Command1 
  20.       Caption         =   "Send Message without UI Interface"
  21.       Height          =   495
  22.       Left            =   240
  23.       TabIndex        =   8
  24.       Top             =   2520
  25.       Width           =   5655
  26.    End
  27.    Begin VB.TextBox szNoteText 
  28.       Height          =   375
  29.       Left            =   1920
  30.       TabIndex        =   7
  31.       Top             =   1800
  32.       Width           =   4095
  33.    End
  34.    Begin VB.TextBox szSubject 
  35.       Height          =   375
  36.       Left            =   1920
  37.       TabIndex        =   6
  38.       Top             =   1320
  39.       Width           =   4095
  40.    End
  41.    Begin VB.TextBox szAddress 
  42.       Height          =   375
  43.       Left            =   1920
  44.       TabIndex        =   3
  45.       Top             =   840
  46.       Width           =   4095
  47.    End
  48.    Begin VB.CommandButton Command2 
  49.       Caption         =   "Login cc:Mail"
  50.       Height          =   375
  51.       Left            =   120
  52.       TabIndex        =   0
  53.       Top             =   120
  54.       Width           =   1335
  55.    End
  56.    Begin Mailx16Lib.MForm MForm1 
  57.       Left            =   2310
  58.       Top             =   3270
  59.       _version        =   65542
  60.       _extentx        =   3651
  61.       _extenty        =   500
  62.       _stockprops     =   0
  63.       mxformname      =   "FormTag1"
  64.    End
  65.    Begin Mailx16Lib.MSess MSess1 
  66.       Left            =   360
  67.       Top             =   3120
  68.       _version        =   65542
  69.       _extentx        =   900
  70.       _extenty        =   900
  71.       _stockprops     =   0
  72.       mail_type       =   2
  73.    End
  74.    Begin Mailx16Lib.MMsg MMsg1 
  75.       Left            =   1200
  76.       Top             =   3120
  77.       _version        =   65542
  78.       _extentx        =   900
  79.       _extenty        =   900
  80.       _stockprops     =   0
  81.       markasread      =   0   'False
  82.       displaysenddialog=   0   'False
  83.       bindstring      =   "MSess1"
  84.       fastfetch       =   -1  'True
  85.    End
  86.    Begin Mailx16Lib.MReci MReci1 
  87.       Left            =   5040
  88.       Top             =   3120
  89.       _version        =   65542
  90.       _extentx        =   900
  91.       _extenty        =   900
  92.       _stockprops     =   0
  93.       bindstring      =   "MMsg1"
  94.    End
  95.    Begin VB.Label Label4 
  96.       Caption         =   "Note Text"
  97.       Height          =   375
  98.       Left            =   240
  99.       TabIndex        =   5
  100.       Top             =   1920
  101.       Width           =   1455
  102.    End
  103.    Begin VB.Label Label3 
  104.       Caption         =   "Subject:"
  105.       Height          =   255
  106.       Left            =   240
  107.       TabIndex        =   4
  108.       Top             =   1320
  109.       Width           =   1455
  110.    End
  111.    Begin VB.Label Label2 
  112.       Caption         =   "Recipient Address:"
  113.       Height          =   255
  114.       Left            =   240
  115.       TabIndex        =   2
  116.       Top             =   840
  117.       Width           =   1575
  118.    End
  119.    Begin VB.Label Label1 
  120.       Caption         =   "This Examples SEND a ""background"" message from Your Code."
  121.       Height          =   375
  122.       Left            =   1680
  123.       TabIndex        =   1
  124.       Top             =   120
  125.       Width           =   4335
  126.    End
  127. Attribute VB_Name = "SimpleForm"
  128. Attribute VB_Creatable = False
  129. Attribute VB_Exposed = False
  130. Private Sub Command1_Click()
  131.     If MSess1.Logon = True Then
  132.         MReci1.Clear
  133.         MReci1.ResolveName = szAddress
  134.         If MReci1.ResolveName = "" Then
  135.             MsgBox "Recipient Address NOT Found"
  136.         Else
  137.             MReci1.Action = ACTION_ADDRECIPIENT
  138.             MMsg1.Action = ACTION_NEW
  139.             MMsg1.WorkingMsg = COMPOSE_MSG
  140.             MReci1.Action = ACTION_RECIP_SET
  141.             MMsg1.Subject = szSubject
  142.             MMsg1.NoteText = szNoteText
  143.             MMsg1.Action = ACTION_SENDMSG
  144.             If MMsg1.ErrorNum = 0 Then
  145.                 MsgBox "Message has been sent"
  146.             Else
  147.                 MsgBox "Error Sending The Mail message"
  148.             End If
  149.         End If
  150.     Else
  151.         MsgBox "No Active Session available"
  152.     End If
  153. End Sub
  154. Private Sub Command2_Click()
  155.     MSess1.Logon = True
  156. End Sub
  157.