0

我有appx。200-300 封邮件发送并使用 Set myMail=CreateObject("CDO.Message") 在 while 循环中发送消息。

但由于大量邮件 - 在发送 50-60 封邮件后出现内部服务器错误,然后其他邮件未成功发送。

我必须做些什么才能让它在经典 ASP 中发送 100 多封电子邮件?

  Set myMail=CreateObject("CDO.Message")
                myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
                myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
                myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
                myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
                myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = ""       
                myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = ""
                myMail.Configuration.Fields.Update

            while not rsprofilo.eof 

                myMail.From = ""
                myMail.To = ""
                myMail.Bcc = ""
                myMail.Subject = ""
                myMail.HTMLBody = ""

                myMail.Send

                rsprofilo.movenext
            wend

    set myMail = nothing
4

1 回答 1

0

我遇到了同样的问题。看看这个页面:

<%
ID_template= request.querystring("ID_template")
s_resume=request.querystring("resume")
s_file = "admin_email_send_go.asp?ID_template=" & ID_template
if (s_resume="yes") then s_file = "admin_email_send_resume.asp?ID_template=" & ID_template
%>
<html>
<head>
<meta http-equiv="Refresh" content="<%=int(session("n_records")/50)%>; url=<%=s_file%>">
    <script type="text/javascript">
    <!--
    function delayer(){
    document.location = "<%=s_file%>"
    }
    //-->
    </script>
</head>
<body onLoad="setTimeout('delayer()',<%=int(session("n_records")*20)%>)" bgcolor='#FFFFFF'>
<br>
<table width='100%' height='100%'>
<tr>
<td valign=middle align=center>
    <table border=1>
    <tr>
    <td>
        Total list size: <%=session("n_records")%><br>
        Sent so far: <%=session("n_records_sent")%>
    </td>
    </tr>
    </table><br>
    <br>
    Sending next group of <%=application("email_group_size")%> in 2 seconds.<br>
    Please wait...<br>
    <br>
    If you want to quit or pause the process at any time, click <a href='admin_email_send.asp?ID_template=<%=ID_template%>'>here</a>.<br>
    <br>
</td>
</tr>
</table>
</body>
</html>
于 2013-06-04T04:04:44.663 回答