home *** CD-ROM | disk | FTP | other *** search
/ Internet Pratica / IPRAT_01.iso / ASP / ASPFusion_Basic_Suite / examples / asp / advsmtp / act_sendmail.asp next >
Encoding:
Text File  |  2001-11-30  |  1.4 KB  |  55 lines

  1. <html>
  2.     <head>
  3.         <title>AdvSMTP Component</title>
  4.     </head>
  5.     <body>
  6.         <%
  7. dim SMTP
  8. set SMTP = Server.CreateObject("AdvSMTP.SMTP")
  9. SMTP.Bcc = Request.Form ("bcc")
  10. SMTP.Body = Request.Form ("Body")
  11. SMTP.Cc = Request.Form ("cc")
  12. SMTP.LogFile = Request.Form ("LogFile")
  13. SMTP.Logging = Request.Form ("Logging")
  14. SMTP.Priority = Request.Form ("Priority")
  15. SMTP.CustomHeader Request.Form("MailerID"), Request.Form("MailerValue")
  16. if (Request.Form("MimeAttach1") <> "") then
  17.     SMTP.MimeAttach Request.Form("MimeAttach1"),Request.Form("Delete1")
  18. end if
  19. if (Request.Form("MimeAttach2") <> "") then
  20.     SMTP.MimeAttach Request.Form("MimeAttach2"),Request.Form("Delete2")
  21. end if
  22. if (Request.Form ("Port") <> "")then
  23.     SMTP.Port = Request.Form ("Port")
  24. end if
  25. if (Request.Form("Receipt") = "On")then
  26.     SMTP.Receipt = true
  27. else
  28.     SMTP.Receipt = false
  29. end if
  30. if (Request.Form("Lookup") = "On")then
  31.     SMTP.Lookup = true
  32. else
  33.     SMTP.Lookup = false
  34. end if
  35.  
  36. SMTP.Server = Request.Form ("Server")
  37. SMTP.Subject = Request.Form ("Subject")
  38. SMTP.Type = Request.Form ("Type")
  39. if (Request.Form ("charsperline") <> "")then
  40.     SMTP.CharsPerLine = Request.Form ("charsperline")
  41. end if
  42.  
  43. SMTP.SendMail Request.Form("From"), Request.Form("To")
  44. if (SMTP.IsError = 1) then
  45.     Response.Write "Error : "&SMTP.ErrorReason & "<br>"
  46. else
  47.     Response.Write "Successfully Done" & "<br>"
  48. end if
  49.  
  50. set SMTP = Nothing
  51. %>
  52.         <a href="dsp_sendmail.htm">Back</a>
  53.     </body>
  54. </html>
  55.