[英]Sending 100+ mails from classic ASP
I have appx. 我有大约 200-300 mails to send and using Set myMail=CreateObject("CDO.Message") to send messages in while loop.
发送200至300封邮件,并使用Set myMail = CreateObject(“ CDO.Message”)在while循环中发送邮件。
But due to large number of mails - It gives internal server error after sending 50-60 mails and then other emails are not sent successfully. 但是由于邮件数量众多-发送50-60封邮件后,它会导致内部服务器错误,然后其他电子邮件将无法成功发送。
What I have to do for allowing it to send 100+ emails in classic ASP? 如何允许它以经典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
I ran into the same problem. 我遇到了同样的问题。 Check out this page:
查看此页面:
<%
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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.