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

ASP
用ASP和WML来实现数据库查询
ASP判断文件地址是否有效!
一个比较实用的asp函数集合类(1)
一个比较实用的asp函数集合类(2)
ASP检索网站指定目录文件的算法与应用方向
用VB将ASP代码封装成DLL
Asp:Cookies应用指南,详细代码及教程
如何在IIS上搭建WAP网站
最新的JMail(4.3版本)发送代码
在客户端执行数据库记录的分页显示
用ASP构建音乐服务器
短信发送程序
用ASP实现电子贺卡
用ASP实现聊天室中的在线答题游戏
利用ASP远程注册DLL的方法
ASP编程技巧大全
验证码的程序及原理
Asp深度揭密(上)
Asp深度揭密(下)
VBS、ASP代码语法加亮显示的类(1)

ASP 中的 W3 Jmail 使用范例


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 38 ::
收藏到网摘: 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)