当前位置: 首页 > 图文教程 > 网络编程 > ASP > W3 Jmail 使用范例

ASP
微软建议的ASP性能优化28条守则(6)
微软建议的ASP性能优化28条守则(7)
微软建议的ASP性能优化28条守则(8)
微软建议的ASP性能优化28条守则(9)
用ASP建立站内搜索
ASP开发中数据库文件调用(1)
ASP开发中数据库文件调用(2)
ASP开发中数据库文件调用(3)
基于ASP的编程常见问题
asp编写的加密和解密类
模似windows XP 左侧的菜单效果(1)
模似windows XP 左侧的菜单效果(2)
模似windows XP 左侧的菜单效果(3)
web应用程序中的数据库连接(1)
web应用程序中的数据库连接(2)
ASP.net中md5加密码的方法
不能使用asp标记的时候的一个解决办法
asp 用存储过程实现数据分页
ASP 五大高效提速技巧
ASP+Access的安全隐患及对策

ASP 中的 W3 Jmail 使用范例


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 59 ::
收藏到网摘: n/a

      
  
   <html>
   <head>
   <title>Confirmation </title>
   <body>
   <%
  
   Set JMail = Server.CreateObject("JMail.SMTPMail")
  
   ' This is my local SMTP server
   JMail.ServerAddress = "mail.yourdomain.com:25"
  
   ' This is me....
   JMail.Sender = "[email protected]"
   JMail.Subject = "Here you go..."
  
   ' Get the recipients mailbox from a form (note the lack of a equal sign).
   JMail.AddRecipient "[email protected]"
   JMail.AddRecipient "[email protected]"
  
   ' The body property is both read and write.
   ' If you want to append text to the body you can
   ' use JMail.Body = JMail.Body & "Hello world!"
   ' or you can use JMail.AppendText "Hello World!"
   ' which in many cases is easier to use.
   JMail.Body = "Here you go. Your request has been approved" &_
   "and the program is attached to this message"
  
  
   ' 1 - highest priority (Urgent)
   ' 3 - normal
   ' 5 - lowest
  
   JMail.Priority = 1
  
   JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
  
   ' Must make sure that IUSR_???? has access to the following files.
   JMail.AppendBodyFromFile "e:\mail\standard_footer.txt"
   JMail.AddAttachment "e:\products\MyProduct.exe"
  
   ' Send it...
   JMail.Execute
  
   %>
   <center>
  
   An e-mail has been sent to your mailbox (<%=request.form("email")%>).
  
   </center>
   </body>
   </html>
  
  (转自chinaasp)