日期:2014-05-17  浏览次数:20919 次

错在哪里?邮件群发? 急!!!
<!--#include   file= "conn.asp "-->

<%
Sub   send()
Dim   rs,   Sql,   JMail
Dim   mailserver,   mailserverloginname,   mailserverloginpass,   sendok,   msg
mailserver   =   "smtp.sohu.com "
mailserverloginname   =   "blue7208@sohu.com "
mailserverloginpass   =   "******* "
'===============   发   信   ================
Set   JMail   =   Server.CreateObject( "Jmail.message ")
JMail.ContentType= "text/html "
JMail.ContentTransferEncoding   =   "utf-8 "
JMail.Encoding   =   "utf-8 "
JMail.Charset   =   "utf-8 "
Jmail.Priority   =   2
JMail.ISOEncodeHeaders   =   False
JMail.Silent   =   True
JMail.Logging   =   True
JMail.FromName   =   "活动方案 "
JMail.From   =   mailserverloginname
Set   rs   =   conn.Execute( "Select   *   From   gust ")
If   Not   rs.Eof   Then
Do   While   Not   rs.Eof
JMail.AddRecipient   rs( "Email ")
JMail.Subject   =   "测试信息 "
Jmail.Body   =   "测试内容。支持HTML "
rs.MoveNext:   Loop
Else
Response.Write   False
End   If
JMail.MailServerUserName   =   mailserverloginname
JMail.MailServerPassWord   =   mailserverloginpass
sendok   =   JMail.Send(mailserver)
If   sendok   Then
msg   =   "已经成功发送了邮件! "
Else
msg   =   "发送邮件失败,可能是您填写了错误的邮件地址。 <br> "   &   _
"如果您确信没有写错邮件地址,则可能是发信程序出了 <br> "   &   _
"故障,请与管理员联系 "
End   If
Response.Write   " <font   color= " "#FF0000 " "   size= " "-1 " "> "
Response.Write   msg
Response.Write   " </font> "
End   Sub

%>

<body>
<div   id= "page ">
<div   id= "page_content ">
<li> 当前位置:   管理首页   &gt;&gt;   <br   />
<fieldset>
<legend> 邮件群发 </legend> <br   />
<label> 选择群件用户: </label>
<select   name= "SelectType ">
<option   value= "1 "> 活动参加会员 </option>
</select>
<input   type= "button "   value= "开始群发 "     onclick= <%call   send()%>   />
</fieldset> <br   />

</div>
</div>
</body>
错在哪里??

------解决方案--------------------
- -#
真是对你折服一阵...