后台邮件发送错误问题(含群发/单发)

wenxiuyun 2003-10-29 09:19:50
错误提示:
服务器对象 错误 'ASP 0177 : 800401f3'

Server.CreateObject 失败

/down/manage/sendmailto.asp,行102

无效的 ProgID。 若要获取关于此消息的更多的信息,请访问 Microsoft 联机支持站点: http://www.microsoft.com/contentredirect.asp 。



相关源码:
<%@language=vbscript codepage=936 %>
<!--#include file="Admin.asp"-->
<!--#include file="Conndb.asp"-->
<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="150" align="center" valign="top"> <table width="150" height="100%" border="0" cellpadding="0" cellspacing="0" class="HeaderTdStyle">
<tr>
<td align="center" valign="top"><table width="100%" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">功能菜单</td>
</tr>
</table>
<table width="100%" height="90%" border="0" cellpadding="0" cellspacing="0" class="MenuBg">
<tr>
<td align="center" valign="top"><br> <table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="16%"><img src="/Img/Left_1.gif" width="28" height="11"></td>
<td width="84%" height="20"><font color="#FFFF00">邮件列表管理</font></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="34%" height="20" align="right"><img src="/Img/Left_1_1.gif" width="29" height="16"></td>
<td width="66%" valign="bottom"><a href="Maildefault.asp"><font color="#FFFF00">邮件列表设置</font></a></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="34%" height="20" align="right"><img src="/Img/Left_1_1.gif" width="29" height="16"></td>
<td width="66%" valign="bottom"><a href="Sendmail.asp"><font color="#FFFF00">发送邮件</font></a></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="34%" height="20" align="right"><img src="/Img/Left_1_1.gif" width="29" height="16"></td>
<td width="66%" valign="bottom"><a href="Viewuser.asp"><font color="#FFFF00">用户管理</font></a></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="34%" height="20" align="right"><img src="/Img/Left_1_1.gif" width="29" height="16"></td>
<td width="66%" valign="bottom"><a href="Adduser.asp"><font color="#FFFF00">添加用户</font></a></td>
</tr>
<tr>
<td height="20" align="right"> </td>
<td valign="bottom"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="862" align="center" valign="top">
<br>
<br>
<b>发 送 邮 件</b><br>
<br>
<br>
<%
'发送
set rs=server.createobject("adodb.recordset")
sql="select * from email "
rs.open sql,conn,1,3

'读取默认的邮件标题及内容
set rs1=server.createobject("adodb.recordset")
sql1="select * from maildefault "
rs1.open sql1,conn,1,3

'设置发信人
frommail=request("frommail")
if frommail="" then
frommail=rs1("frommail")
end if

'设置邮件主题
mailsubject=request("mailsubject")
if mailsubject="" then
mailsubject=rs1("mailsubject")
end if

'设置邮件内容
mailbody=request("mailbody")
if mailbody="" then
mailbody=rs1("mailbody")
end if

'判断对谁发信
tomail=request("tomail")
'写发信信息
response.write "发信人地址: "&frommail
response.write "<br><br><br>"
if tomail<>"" then
response.write "收信人地址:"&tomail
else
response.write "正在进行邮件群发!"
end if

if tomail<>"" then
'对于单一用户发信
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = frommail
objCDOMail.To = tomail
objCDOMail.Subject = mailsubject
objCDOMail.Body = mailbody
objCDOMail.Send
Set objCDOMail = Nothing
else

'对于在用户数据库中的全体用户发信
for i=1 to rs.recordcount
tomail=rs("email")
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = frommail
objCDOMail.To = tomail
objCDOMail.Subject = mailsubject
objCDOMail.Body = mailbody
objCDOMail.Send
Set objCDOMail = Nothing
rs.movenext
next
end if
response.write "<br><br><br>"
response.write "邮件发送成功!^&^"
'response.write "<br><br><br>"
'response.write rs1("mailsubject")
%> <a href="Sendmail.asp">返回</a>
</td>
</tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
...全文
69 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
eliphe 2003-12-10
  • 打赏
  • 举报
回复
HSkyXSmtp Web邮件群发组件 1.5

下载地址:http://www.skyec.com/U_View_cpxz_detail.asp?ProductID=11


简介:
HSkyXSmtp Web邮件群发专家,使用简单,功能强大。
  同时支持匿名和身份验证,适用于多种服务器环境,更方便使用。
  率先支持用户名和密码加密保护机制,更加安全可靠。
  采用多文本编辑模式,可直接添加字符和调入文本文件,信件格式更随心所欲。
  支持html编码超文本信件,让你的信件别出心裁,更具亮点。
  可同时发送多个附件,操作简单,速度极快。
  采用了标准的Com组件方式,只需服务器端注册即可,而再也不用担心客户机是否支持。
  本组件经过多种平台环境负荷压力测试,运行稳定、速度快、资源占用低。


用HSkyXSmtp Web邮件群发 1.5 只需安装即可,无需设置其他项,附带完整的asp,C#,VBNet的演示代码。
  • 打赏
  • 举报
回复
控制面板-》添加删除程序-》WINDOWS组件-》IIS
启动和关闭:控制面板-》管理工具-》服务-》Simple Mail Transport Protocol
Tal 2003-10-30
  • 打赏
  • 举报
回复
控制面板-》添加删除程序-》WINDOWS组件-》Inertnet....
wenxiuyun 2003-10-29
  • 打赏
  • 举报
回复
请问怎样安装smtp服务?
Tal 2003-10-29
  • 打赏
  • 举报
回复
你要安装SMTP服务,再启动就可以啊
wenxiuyun 2003-10-29
  • 打赏
  • 举报
回复
请谁帮我回答?

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧