W3 Jmail 使用范例

2016-01-29 19:23 3 1 收藏

W3 Jmail 使用范例,W3 Jmail 使用范例

【 tulaoshi.com - ASP 】

      
  
   <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 = "myemail@mydomain.net"
   JMail.Subject = "Here you go..."
  
   ' Get the recipients mailbox from a form (note the lack of a equal sign).
   JMail.AddRecipient "mum@any.com"
   JMail.AddRecipient "dad@some.com"
  
   ' 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:mailstandard_footer.txt"
   JMail.AddAttachment "e:productsMyProduct.exe"
  
   ' Send it...
   JMail.Execute
  
   %>
   <center>
  
   An e-mail has been sent to your mailbox (<%=request.form("email")%>).
  
   </center>
   </body>
   </html>
  
  (转自chinaasp)
  
  

 

来源:https://www.tulaoshi.com/n/20160129/1509268.html

延伸阅读
标签: ASP
  <%  Set pop3 = Server.CreateObject( "JMail.POP3" )      'pop3的连接用户名,密码,pop3地址   pop3.Connect "username", "password", "mail.mydomain.com"   Response.Write( "你有" & pop3.count & " 封邮...
标签: Web开发
关于Jmail的配置和相关的存储过程的内容,这里有参考资料,我就不详细描述了. 配置好一切后,试图通过调用该存储过程发送一封邮件给管理员.但是查询分析器返回的结果是 错误源: jmail.Message 错误描述: The message was undeliverable. All servers failed to receive the message 首先怀疑是安全性问题引起的,对JMAIL.DL...
标签: Web开发
        很久之前听一位朋友讲过,使用UTF-8编码发送邮件,会有乱码的情况发生。近日为公司开发支持多语言的网站,正好要使用UTF-8编码。网站有会员注册,查询表单等模块皆需要发送邮件给注册用户或者管理员。心里寻思着免不了要和这乱码问题起正面冲突了。       ...
标签: 电脑入门
在前面的教程中我们有提到,使用top、vmstat等命令可以查看Linux系统CPU的使用率,即系统负载。(详见系统之家怎么使用Linux命令查看CPU使用率),除了这些命令外,还可使用w命令和uptime命令来查看Linux系统的负载,一起来了解下吧。 1. w命令 [root@linuxidc ~]# w 14:44:27 up 62 days, 3 min, 2 users, load average: 0.00,...
private void sendmail_jmail() {//使用jmail进行邮件发送;需要添加引用jmail.dll //jmail.SMTPMailClass mail = new jmail.SMTPMailClass(); jmail.MessageClass msg = new jmail.MessageClass(); msg.From = this.tb_from.Text.Trim(); msg.AddRecipient(this.tb_to.Text.Trim()," Gallon来信",""); msg.Body= this.tb_mailBody.Text...

经验教程

440

收藏

80
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部