home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / dm10e / vbtest.asp < prev   
Encoding:
Text File  |  1999-04-29  |  1.1 KB  |  52 lines

  1. <%@ LANGUAGE="VBScript" %>
  2.  
  3. <HTML>
  4. <BODY>
  5.  
  6. <pre>
  7. <b>
  8. Geocel DevMailer 1.0
  9. VBScript Usage Example
  10. (c) 1999, Geocel International, Inc.
  11. </b>
  12. </pre>
  13.  
  14. <%
  15.  
  16.     ' Create DevMailer Object
  17.      Set Mailer = CreateObject("Geocel.Mailer")
  18.  
  19.     ' Add first SMTP server
  20.      Mailer.AddServer "mailhost.geocel.com", 25
  21.     
  22.     ' Set Sender Information
  23.      Mailer.FromAddress = "support@geocel.com"
  24.      Mailer.FromName = "Geocel Support"
  25.  
  26.     ' Add a recipient to the message
  27.      Mailer.AddRecipient "lham@geocel.com", "L. Ham"
  28.  
  29.     ' Set the Subject and Body
  30.      Mailer.Subject = "Welcome to DevMailer VBScript Test"
  31.  
  32.      Mailer.Body =    "Test Message Body Line 1" & VbCrLf & _
  33.             "Test Message Body Line 2" & VbCrLf
  34.  
  35.     ' Send Email - Perform Error Checking
  36.     bSuccess = Mailer.Send()
  37.  
  38.     If bSuccess = False Then
  39.         If Mailer.Queued = False Then
  40.             Response.Write "<h3>Could not send message..queueing failed!</h3>"
  41.         Else
  42.             Response.Write "<h3>Could not send message..queued instead!</h3>"
  43.         End If
  44.     Else
  45.         Response.Write "<h3>Message Sent Successfully!</h3>"
  46.     End If
  47. %>
  48.  
  49. <BR>
  50.  
  51. </BODY>
  52. </HTML>