But a couple weeks ago I started getting this error message "transport failed to connect to server". So I increased the smtp connection timeout.
Then I started getting an error saying the maximum amount of time for my script to run had been reached. So I increased Sever.ScriptTimeout.
Now I'm just getting a generic error message saying my page cannot be displayed.
All my script does is send email to a list of users. The list of users is gotten from a database. After all the emails are sent then I display a table the shows which users were emailed. If I comment out my call to .Send(), then the page that shows the list of users displays just fine. So I know the problem isn't with getting a list of users nor is it connecting to the database.
However, if my user list is only 12 users long then the emails are sent out fine. It takes a while but everything works great. If the user list is more than 12 users then that's when I get the "cannot display page" error.
Below is a snippet of my code that actually sends out the emails:
Expand|Select|Wrap|Line Numbers
- Dim Newmail, iConf, Flds
- Set Newmail = Server.CreateObject ("cdo.message")
- Set iConf = Server.CreateObject("cdo.Configuration")
- Set Flds = iConf.Fields
- With Flds
- .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
- .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "11.11.111.1"
- .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
- .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30
- .Update
- End With
- With Newmail
- Set .Configuration = iConf
- .To = email_to
- .From = email_from
- .Subject = email_subject
- .HTMLBody = email_body
- .Send()
- End With
- Set Newmail = Nothing
- Set Flds = Nothing
- Set iConf = Nothing
Thanks!
Jennifer