如果要读取邮件,现在的SMTP都加了身份验证,需要用户名称及口令[Base64编码]
<%@ Language=VBScript %>
<%
Rem URL=http://www.newglory.com.cn/System/CustomerWord/Debug_CDONTS.asp?Type=1
Rem Response.Write "电子邮件系统测试......<br>"
Dim NewMail
Set NewMail=CreateObject("CDONTS.NewMail")
Dim Subject,HTML,Body
HTML=""
Body=""
Subject="客户留言"
If Request.QueryString("Type")="0" Then
HTML="待定"
ElseIf Request.QueryString("Type")="1" Then
HTML=HTML+"<html>"
HTML=HTML+"</html>"
Else
End If
Body=HTML
Rem NewMail.AttachFile("")
Rem NewMail.AttachURL "http://www.newglory.com.cn/Default.asp","Default.asp"
Rem 权限问题.
Rem NewMail.Send "辽宁省国瑞商贸有限公司","glory@newglory.com.cn <glory@newglory.com.cn>",Subject,Body,2
Rem Set NewMail=Nothing
If Not(NewMail Is Nothing) Then
With NewMail
.From="客户留言"
.To="glory@newglory.com.cn"
.Subject=Subject
.Body=Body
.Importance=2
.BodyFormat=0
.MailFormat=0
.Send
End With
Set NewMail=Nothing
Else
Response.Write "服务器对象创建失败!"
End If
%>