home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD33342102000.psc / cSend.cls < prev   
Encoding:
Visual Basic class definition  |  2000-02-09  |  4.2 KB  |  110 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "cSend"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = False
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = True
  14. '********************************************************************************'
  15. '*                                                                              *'
  16. '*  Programmer: Donathan Hutchings                                              *'
  17. '*  Date:       02/09/2000                                                      *'
  18. '*  Project:    MAPI Mail ActiveX Dynamic Link Library                          *'
  19. '*                                                                              *'
  20. '*  Purpose:    This class is designed to be the send interface between the     *'
  21. '*              cMAPI and class.  It also provides the method to send messages. *'
  22. '*                                                                              *'
  23. '*  Required:   The Microsoft MAPI control is required to use this DLL.         *'
  24. '*                                                                              *'
  25. '********************************************************************************'
  26.  
  27. Option Explicit
  28.  
  29. Private m_SendTo As String      'Temporary variable to store the destination of the email.
  30. Private m_Subject As String     'Temporary variable to store the subject of the email.
  31. Private m_Message As String     'Temporary variable to store the message of the email.
  32. Private m_FileName As Variant   'Temporary variable to store the file name(s) of the attachment(s).
  33.  
  34. 'This is the GET property to retrieve the destination of the email message.
  35. Public Property Get SendTo() As String
  36.     SendTo = m_SendTo
  37. End Property
  38.  
  39. 'This is the LET property to set the destination of the email message.
  40. Public Property Let SendTo(vNewValue As String)
  41.     m_SendTo = vNewValue
  42. End Property
  43.  
  44. 'This is the GET property to retrieve the subject of the email message.
  45. Public Property Get Subject() As String
  46.     Subject = m_Subject
  47. End Property
  48.  
  49. 'This is the LET property to set the subject of the email message.
  50. Public Property Let Subject(vNewValue As String)
  51.     m_Subject = vNewValue
  52. End Property
  53.  
  54. 'This is the GET property to retrieve the message of the email message.
  55. Public Property Get Message() As String
  56.     Message = m_Message
  57. End Property
  58.  
  59. 'This is the LET property to set the message of the email message.
  60. Public Property Let Message(vNewValue As String)
  61.     m_Message = vNewValue
  62. End Property
  63.  
  64. 'This is the GET property to retrieve the file name(s) of the attachments.
  65. Public Property Get FileName() As Variant
  66.     FileName = m_FileName
  67. End Property
  68.  
  69. 'This is the LET property to set the file name(s) of the attachments.
  70. Public Property Let FileName(vNewValue As Variant)
  71.     m_FileName = vNewValue
  72. End Property
  73.  
  74. 'This function sends the email to the MAPI email clients OutBox.
  75. 'Properties used:       FileName
  76. '                       Message
  77. '                       Subject
  78. '                       SendTo
  79.  
  80. 'The ErrCode and ErrMsg are variables that are returned to the calling
  81. 'routine if an error occurs.
  82. Public Function SendMail(ErrCode As Long, ErrMsg As String) As Boolean
  83.     Diml(ErrcVtxOutNee
  84.   DataBindingtNee
  85.   DataBi
  86. Public Property Let FileName(vn SendMail(ErrCode ert nds the email   DataBindinmentspTriProBi
  87. Pnis the email   oert nds turx    oFsinmentspTri( uerty
  88.  
  89. 'Thi' of obaan
  90.  (vNewValue As String)
  91.     m_Message = vNewValue
  92. End Property
  93.  
  94. 'This               sdingtNi
  95. Pnis the emAeThe)    O:   elM  O:   snnction SendMail(ErrCode As Long, ErrMsg As String) As Boolean
  96.     D0nf0rwValue As String)
  97.     m_Subject = vNewValue
  98. End Probject = NewValu m_(eNamVItentsptaBasssssssee M=' of obaan
  99.  (vNStrC uersssssMmNmng
  100. '.ewValue
  101. End Probject = NewValu mos isfOnoS
  102. 'u mo"aTenject = NewVlue
  103. Endircn O:    oFsiy
  104. atdingtNi
  105. Pnis the emAeTu mo)lT of ict = NewVlue
  106. Endircn O:    oFsiy
  107. atdingtNi
  108. Pnis the e)lT F2rngtNi
  109. Pnisiy
  110. nf0t ndsLw'nf0t ndsLwsLw'n0t d to be the send interface betorface be, ErrMsg iOfF