Asp学习站欢迎你!

使用cdonts进行在线邮件发送

来源:ASP学习网 作者:Admin 时间:08-08-26 点击:

<%
  On Error Resume Next
  Dim email
  Set email=server.CreateObject("cdonts.newmail") powered by 9asp.com.cn
  If Not IsObject(email) Then  
  SendMail = Err.Description
 
  End If
  email.BodyFormat =1 'HTML格式,如果是纯文本则是1
  email.MailFormat =0  
  email.From="strystry@163.com"       '用户邮箱
  email.To ="strystry@163.com"     '我的邮箱
  email.Subject ="您好啊"     '邮件标题
  email.Body="9asp.com.cn"       '邮件内容
  email.Send
 
  If Err Then
  SendMail = Err.Description
  Else
  SendMail = "OK"
  End If
  Set email = Nothing
 
  if SendMail <> "OK" then
  Response.Write("<script>alert('发送邮件时出错,出错信息:" & chr(10) & chr(13) & SendMail & "');")
  Response.Write("history.back();</script>")
  end if
 
  Response.Write("<script>alert('"&SendMail&"  成功将您反馈的信息发送到我们公司的Email邮箱中!!!');</script>")
  %>
打印】 【关闭
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 验证码: 验证码 查看所有评论