为什么我的机子老是收发同一邮件?
我用如下代码发送邮件,可是在我的邮箱里老是收到很同一邮件,发送时间都是一样的
<!--#include file="../inc/conn.asp"-->
<%
dim email,username,password
email=request("email")
dim rs, sql
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from [Author_users] where email='"&email&"' and userName<>'' order
by ID desc"
rs.Open sql,conn,1,1
username=rs("username")
password=rs("password")
Dim cm
'创建对象
Set cm=Server.CreateObject("CDO.Message")
'设置发信人的邮箱
cm.From="dfhm@test.com"'"from@test.com"
'设置收信人的邮箱
cm.To=email
'设定邮件的主题
cm.Subject="Username and password"
'cm.TextBody="http://www.knowsky.com/rss/"
'上面是使用普通的文本格式发送邮件,只能是文字,不能支持html,所以这里不用
cm.HtmlBody="Your login information to access , Online Peer Review system for the
Canadi an Geotechnical Journal.<p>"&_
"username:"&username&"<br>"&_
"password:"&password&"</p><p>"&_
"Please note: the username and password are case sensitive.Please store this info
rmation in a safe place."&_
"If you wish to change your username and password or contact information please
s"&_
"elect '&change your details' from the main page after you have logged in."
'上面就是你构建的html正文,这样发出的邮件就比只有文字的好看多了。不要说你不会html
吧
'cm.AddAttachment Server.MapPath("test.zip")
'如果有需要发送附件的话就用上面的方法把文件附加进去。
cm.Send
'最后当然是执行发送了
Set cm=Nothing
'发送成功后即时释放对象
Response.Write("发送邮件成功。")
rs.close
set rs=nothing
%>
<!--#include file="../inc/conn.asp"-->
<%
dim email,username,password
email=request("email")
dim rs, sql
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from [Author_users] where email='"&email&"' and userName<>'' order
by ID desc"
rs.Open sql,conn,1,1
username=rs("username")
password=rs("password")
Dim cm
'创建对象
Set cm=Server.CreateObject("CDO.Message")
'设置发信人的邮箱
cm.From="dfhm@test.com"'"from@test.com"
'设置收信人的邮箱
cm.To=email
'设定邮件的主题
cm.Subject="Username and password"
'cm.TextBody="http://www.knowsky.com/rss/"
'上面是使用普通的文本格式发送邮件,只能是文字,不能支持html,所以这里不用
cm.HtmlBody="Your login information to access , Online Peer Review system for the
Canadi an Geotechnical Journal.<p>"&_
"username:"&username&"<br>"&_
"password:"&password&"</p><p>"&_
"Please note: the username and password are case sensitive.Please store this info
rmation in a safe place."&_
"If you wish to change your username and password or contact information please
s"&_
"elect '&change your details' from the main page after you have logged in."
'上面就是你构建的html正文,这样发出的邮件就比只有文字的好看多了。不要说你不会html
吧
'cm.AddAttachment Server.MapPath("test.zip")
'如果有需要发送附件的话就用上面的方法把文件附加进去。
cm.Send
'最后当然是执行发送了
Set cm=Nothing
'发送成功后即时释放对象
Response.Write("发送邮件成功。")
rs.close
set rs=nothing
%>
...全文
相关推荐
如何实现udp组播时,自已发组播自已不收组播,其他机子就能收到组播.但是自已发组播自已也收组播,其他机子就收不到组播.原因是?
udp组播时: 自已发自已不收,其他机子就能收到组播. 自已发自已也收,其他机子就收不到组播.这如何实现?这是为什么? 如何实现udp组播时,自已发组播自已不收组播,其他机子就能收到组播.但是自已发组播自已也收组播,其他机子就收不到组播.这是为什么?
随机子空间算法例子
随机子空间算法的演示,其中的一个实例的matlab语言代码。可以参考
python随机子空间法.py
随机子空间法的python实现,用于振动信号模态识别
可以免费开机子的软件
可以免费开机子的软件,不要乱用。可以免费开机子的软件,不要乱用可以免费开机子的软件,可以免费开机子的软件,不要乱用不要乱用可以免费开机子的软件,不要乱用可以免费开机子的软件,不要乱用
udp一发多收,本机能收到,其它机子收不到
udp一发多收,本机能收到,其它机子收不到是什么原因?怎么解决


