留言评论邮件通知博主For pjblog2.6|2.7
作者:小戒 日期:2007-12-11
每一行之前加入注释掉。
5。打开ConContent.asp,找到:在下面插入:找
复制内容到剪贴板
程序代码
程序代码'
5。打开ConContent.asp,找到:
复制内容到剪贴板
程序代码
程序代码 <tr>
<td width="180"><div align="right"> 站长邮件地址 </div></td>
<td align="left"><input name="blog_email" type="text" size="50" class="text" value="<%=blog_email%>"/></td>
</tr>
<td width="180"><div align="right"> 站长邮件地址 </div></td>
<td align="left"><input name="blog_email" type="text" size="50" class="text" value="<%=blog_email%>"/></td>
</tr>
复制内容到剪贴板
程序代码
程序代码 <tr>
<td width="180"><div align="right"> 邮件发送组件 </div></td>
<td align="left"><select name="blog_jmail">
<option value="1" <%if trim(blog_jmail)="1" then response.write "selected"%>>
<%
ObjTest("JMail.SmtpMail")
If IsObj then
response.write "支持JMail.SmtpMail"
Else
response.write "不支持JMail.SmtpMail"
End If
%>
</option>
<option value="0" <%if trim(blog_jmail)="0" then response.write "selected"%>>
<%
ObjTest("CDONTS.NewMail")
If IsObj then
response.write "支持CDONTS.NewMail"
Else
response.write "不支持CDONTS.NewMail"
End If
%>
</option>
</select>请选择您的服务器所支持的邮件发送组件</td>
</tr>
<tr>
<td width="180"><div align="right"> SMTP服务器 </div></td>
<td align="left"><input name="blog_smtp" type="text" size="50" class="text" value="<%=blog_smtp%>"/></td>
</tr>
<tr>
<td width="180"><div align="right">发件信箱 </div></td>
<td align="left"><input name="blog_smtpmail" type="text" size="50" class="text" value="<%=blog_smtpmail%>"/></td>
</tr>
<tr>
<td width="180"><div align="right"> SMTP用户名 </div></td>
<td align="left"><input name="blog_smtpuser" type="text" size="50" class="text" value="<%=blog_smtpuser%>"/></td>
</tr>
<tr>
<td width="180"><div align="right"> SMTP密码 </div></td>
<td align="left"><input name="blog_smtppassword" type="password" size="50" class="text" value="<%=blog_smtppassword%>"/></td>
</tr>
<td width="180"><div align="right"> 邮件发送组件 </div></td>
<td align="left"><select name="blog_jmail">
<option value="1" <%if trim(blog_jmail)="1" then response.write "selected"%>>
<%
ObjTest("JMail.SmtpMail")
If IsObj then
response.write "支持JMail.SmtpMail"
Else
response.write "不支持JMail.SmtpMail"
End If
%>
</option>
<option value="0" <%if trim(blog_jmail)="0" then response.write "selected"%>>
<%
ObjTest("CDONTS.NewMail")
If IsObj then
response.write "支持CDONTS.NewMail"
Else
response.write "不支持CDONTS.NewMail"
End If
%>
</option>
</select>请选择您的服务器所支持的邮件发送组件</td>
</tr>
<tr>
<td width="180"><div align="right"> SMTP服务器 </div></td>
<td align="left"><input name="blog_smtp" type="text" size="50" class="text" value="<%=blog_smtp%>"/></td>
</tr>
<tr>
<td width="180"><div align="right">发件信箱 </div></td>
<td align="left"><input name="blog_smtpmail" type="text" size="50" class="text" value="<%=blog_smtpmail%>"/></td>
</tr>
<tr>
<td width="180"><div align="right"> SMTP用户名 </div></td>
<td align="left"><input name="blog_smtpuser" type="text" size="50" class="text" value="<%=blog_smtpuser%>"/></td>
</tr>
<tr>
<td width="180"><div align="right"> SMTP密码 </div></td>
<td align="left"><input name="blog_smtppassword" type="password" size="50" class="text" value="<%=blog_smtppassword%>"/></td>
</tr>
[本日志由 小戒 于 2008-09-18 08:48 PM 编辑]
上一篇: 评论留言加上邮箱和网址
下一篇: 给日志评论增加回复功能for pjblog (4/5凌晨更新,修改越权提交的BUG,危险)
文章来自: 本站原创
Tags: 留言 评论 PJBLOG
相关日志:
评论: 5 | 引用: 0 | 查看次数: -
blogcomm.asp代码段:
("&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.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")
小戒 于 回复
("&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.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")
看似没错。应该是缺少了相关变量的定义。请按照提供方法修改。
我把以下代码作为一个单独的asp文件就可以发出去,可是把它整合到blogcomm.asp就出现showmsg.asp中的空白提示框,即未出现评论发表成功等信息,查了下邮箱也未收到信,不知为什么?特来问下:
sendmail.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
%>
sendmail.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
%>
留言时的错误提示:
复制内容到剪贴板代码:
错误类型:
Microsoft VBScript runtime (0x800A01F4)
Variable is undefined: 'SQLcomm'
/Plugins/Guestbook/bookaction.asp, 第 159 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MAXTHON 2.0)
网页:
POST 148 ??? /Plugins/Guestbook/bookaction.asp
POST Data:
ChangeTime=20&username=xuting&validate=%E5%89%8D&book_face=face5&Message=+%E5%8E%85%E5%9C%A8&action=post&submit=%E5%8F%91%E8%A1%A8%E7%95%99%E8%A8%80
时间:
12 December 2007, 05:18:46
好像都是说SQLcomm未定义,请LZ帮忙解决一下,谢谢
小戒 于 回复
复制内容到剪贴板代码:
错误类型:
Microsoft VBScript runtime (0x800A01F4)
Variable is undefined: 'SQLcomm'
/Plugins/Guestbook/bookaction.asp, 第 159 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MAXTHON 2.0)
网页:
POST 148 ??? /Plugins/Guestbook/bookaction.asp
POST Data:
ChangeTime=20&username=xuting&validate=%E5%89%8D&book_face=face5&Message=+%E5%8E%85%E5%9C%A8&action=post&submit=%E5%8F%91%E8%A1%A8%E7%95%99%E8%A8%80
时间:
12 December 2007, 05:18:46
好像都是说SQLcomm未定义,请LZ帮忙解决一下,谢谢
2。打开blogcomm.asp,找到复制内容到剪贴板代码:
Conn.ExeCute("update blog_Content set log_CommNums=log_CommNums+1 where log_ID="&post_logID)由于之前我做了某些修改,也提供过修改方法,可能部分朋友已经修改过,所以这里用到了一个之前用的已经定义了的变量。请先搜索下是否有SQLcomm,log_commcomm,如有就OK,如没有,先插入一行dim SQLcomm,log_commcomm,谢谢yangjun.cn指正。
Conn.ExeCute("update blog_Content set log_CommNums=log_CommNums+1 where log_ID="&post_logID)由于之前我做了某些修改,也提供过修改方法,可能部分朋友已经修改过,所以这里用到了一个之前用的已经定义了的变量。请先搜索下是否有SQLcomm,log_commcomm,如有就OK,如没有,先插入一行dim SQLcomm,log_commcomm,谢谢yangjun.cn指正。
修改完以后,发表评论时的错误提示:
复制内容到剪贴板代码:
错误类型:
Microsoft VBScript runtime (0x800A01F4)
Variable is undefined: 'SQLcomm'
/blogcomm.asp, 第 229 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MAXTHON 2.0)
网页:
POST 153 ??? /blogcomm.asp
POST Data:
username=xuting&Message=%E5%93%88%E5%93%88%E3%80%82%E3%80%82%E3%80%82%E3%80%82%E3%80%82&logID=34&action=post&submit2=%E5%8F%91%E8%A1%A8%E8%AF%84%E8%AE%BA
复制内容到剪贴板代码:
错误类型:
Microsoft VBScript runtime (0x800A01F4)
Variable is undefined: 'SQLcomm'
/blogcomm.asp, 第 229 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MAXTHON 2.0)
网页:
POST 153 ??? /blogcomm.asp
POST Data:
username=xuting&Message=%E5%93%88%E5%93%88%E3%80%82%E3%80%82%E3%80%82%E3%80%82%E3%80%82&logID=34&action=post&submit2=%E5%8F%91%E8%A1%A8%E8%AF%84%E8%AE%BA
发表评论


回复


最后一步
不过还是谢谢版版帮我改了一个文件
cache这个文件我是改了不知道多少次了
仍然都错
麻烦你了