使用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>")
%>
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>")
%>
下一篇:一句话 连接客户端