|
PJFORUM新人
  
- UID
- 42552
- 帖子
- 4
- 精华
- 0
- 积分
- 314
- PJ币
- 23 元
- 专长
-
- 在线时间
- 31 小时
- 注册时间
- 2007-5-14
|
14#
大 中
小 发表于 2007-12-12 14:38 只看该作者
问下哈,当如下代码作为单独的ASP文件时可以发信 引用: <%
Set JMail = Server.CreateObject("JMail.Message")
JMail.silent = true
JMail.Logging = true
JMail.Charset = "gb2312"
JMail.MailServerUserName = "suny@loveshot.cn"
JMail.MailServerPassword = "******"
JMail.From = "suny@loveshot.cn"
JMail.FromName ="suny"
JMail.AddRecipient "zi.m.xie@gmail.com","loveshot"
JMail.Subject = "您发表的文章已有客人发表了评论"
JMail.Body = "hehe"
JMail.Send("mail.loveshot.cn")
JMail.close
set JMail= nothing
%> 但插入到blogcomm.asp时却发不了不知为什么
blogcomm.asp片段 引用: if post_DisKEY=1 then post_DisKEY=0 else post_DisKEY=1
'插入数据
Dim AddComm
AddComm=array(array("blog_ID",post_logID),array("comm_Content",post_Message),array("comm_Author",username),array("comm_DisSM",post_DisSM),array("comm_DisUBB",post_DisUBB),array("comm_DisIMG",post_disImg),array("comm_AutoURL",post_DisURL),Array("comm_PostIP",getIP),Array("comm_AutoKEY",post_DisKEY),array("comm_theurl",theurl))
DBQuest "blog_Comment",AddComm,"insert"
'Conn.ExeCute("INSERT INTO blog_Comment(blog_ID,comm_Content,comm_Author,comm_DisSM,comm_DisUBB,comm_DisIMG,comm_AutoURL,comm_PostIP,comm_AutoKEY) VALUES ("&post_logID&",'"&post_Message&"','"&username&"',"&post_DisSM&","&post_DisUBB&","&post_disImg&","&post_DisURL&",'"&getIP()&"',"&post_DisKEY&")")
Set JMail = Server.CreateObject("JMail.Message")
JMail.silent = true
JMail.Logging = true
JMail.Charset = "gb2312"
JMail.MailServerUserName = "suny@loveshot.cn"
JMail.MailServerPassword = "******"
JMail.From = "suny@loveshot.cn"
JMail.FromName ="suny"
JMail.AddRecipient "zi.m.xie@gmail.com","loveshot"
JMail.Subject = "您发表的文章已有客人发表了评论"
JMail.Body = "hehe"
JMail.Send("mail.loveshot.cn")
JMail.close
set JMail= nothing
Conn.ExeCute("update blog_Content set log_CommNums=log_CommNums+1 where log_ID="&post_logID)
Conn.ExeCute("update blog_Info set blog_CommNums=blog_CommNums+1")
Response.Cookies(CookieName)("memLastpost")=Now()
getInfo(2)
NewComment(2)
if memName<>empty then
conn.execute("update blog_Member set mem_PostComms=mem_PostComms+1 where mem_Name='"&memName&"'")
end if
SQLQueryNums=SQLQueryNums+3
Response.Cookies("sunycookie")("issuny") =username
Response.Cookies("sunycookie")("messageid") =request.form("logID")
Response.Cookies("sunycookie").Expires=Date+365
ReInfo(0)="评论发表成功"
ReInfo(1)="<b>你成功地对该日志发表了评论</b><br/><a href=""default.asp?id="&post_logID&""">单击返回该日志</a>"
ReInfo(2)="MessageIcon"
Session(CookieName&"_LastDo")="AddComment"
postcomm=ReInfo
PostArticle post_logID
|