I have appx. 200-300 mails to send and using Set myMail=CreateObject("CDO.Message") to send messages in while loop.
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.
What I have to do for allowing it to send 100+ emails in classic ASP?
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
Server.ScriptTimeout
. Also, wrap upmyMail.send
inon error
statetement and manually check errors. – VMV