home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / mail / mailx6 / _setup.1 / OCXSEND.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-02-07  |  4.6 KB  |  156 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        =   65541
  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        =   65541
  69.       _extentx        =   900
  70.       _extenty        =   900
  71.       _stockprops     =   0
  72.       mail_type       =   2
  73.    End
  74.    Begin Mailx16Lib.MMsg MMsg1 
  75.       Left            =   1365
  76.       Top             =   3120
  77.       _version        =   65541
  78.       _extentx        =   900
  79.       _extenty        =   900
  80.       _stockprops     =   0
  81.       markasread      =   0   'False
  82.       displaysenddialog=   0   'False
  83.       bindstring      =   "MSess1"
  84.    End
  85.    Begin Mailx16Lib.MReci MReci1 
  86.       Left            =   5040
  87.       Top             =   3120
  88.       _version        =   65541
  89.       _extentx        =   900
  90.       _extenty        =   900
  91.       _stockprops     =   0
  92.       bindstring      =   "MMsg1"
  93.    End
  94.    Begin VB.Label Label4 
  95.       Caption         =   "Note Text"
  96.       Height          =   375
  97.       Left            =   240
  98.       TabIndex        =   5
  99.       Top             =   1920
  100.       Width           =   1455
  101.    End
  102.    Begin VB.Label Label3 
  103.       Caption         =   "Subject:"
  104.       Height          =   255
  105.       Left            =   240
  106.       TabIndex        =   4
  107.       Top             =   1320
  108.       Width           =   1455
  109.    End
  110.    Begin VB.Label Label2 
  111.       Caption         =   "Recipient Address:"
  112.       Height          =   255
  113.       Left            =   240
  114.       TabIndex        =   2
  115.       Top             =   840
  116.       Width           =   1575
  117.    End
  118.    Begin VB.Label Label1 
  119.       Caption         =   "This Examples SEND a ""background"" message from Your Code."
  120.       Height          =   375
  121.       Left            =   1680
  122.       TabIndex        =   1
  123.       Top             =   120
  124.       Width           =   4335
  125.    End
  126. Attribute VB_Name = "SimpleForm"
  127. Attribute VB_Creatable = False
  128. Attribute VB_Exposed = False
  129. Private Sub Command1_Click()
  130.     If MSess1.Logon = True Then
  131.         MReci1.Clear
  132.         MReci1.ResolveName = szAddress
  133.         If MReci1.ResolveName = "" Then
  134.             MsgBox "Recipient Address NOT Found"
  135.         Else
  136.             MReci1.Action = ACTION_ADDRECIPIENT
  137.             MMsg1.Action = ACTION_NEW
  138.             MMsg1.WorkingMsg = COMPOSE_MSG
  139.             MReci1.Action = ACTION_RECIP_SET
  140.             MMsg1.Subject = szSubject
  141.             MMsg1.NoteText = szNoteText
  142.             MMsg1.Action = ACTION_SENDMSG
  143.             If MMsg1.ErrorNum = 0 Then
  144.                 MsgBox "Message has been sent"
  145.             Else
  146.                 MsgBox "Error Sending The Mail message"
  147.             End If
  148.         End If
  149.     Else
  150.         MsgBox "No Active Session available"
  151.     End If
  152. End Sub
  153. Private Sub Command2_Click()
  154.     MSess1.Logon = True
  155. End Sub
  156.