MVC3 application using a for each loop to generate the emails It fails about 10 emails or so into the loop saying Operation Has Timed Out... This only occurs when the app is live on the Winhost server, running with the same very code from debug mode in VS runs fine... Code is as follows and is contained inside a for each loop to handle multiple registrants...: Code: Dim SmtpServer As New SmtpClient() Dim mail As New MailMessage() mail.Subject = "Enrolled Courses for the upcoming conference" mail.To.Add(_UserName) mail.From = New MailAddress("[email protected]") mail1.Body = _body Dim smtp As New SmtpClient Dim basicAuthenticationInfo As New System.Net.NetworkCredential("[email protected]", "xxxxxxxx") smtp1.Host = "mail.xxxxxxxxxxx.com" smtp1.UseDefaultCredentials = False smtp1.Credentials = basicAuthenticationInfo1 smtp1.Send(mail) Any Ideas????? I have worked around this for months by just running the task from debug mode but that is not acceptable since my customer cant run vs on my code to send a mass email when they need to..
Try putting in some timer in between each email sent. Please also read our Acceptable Use Policy regarding Mass Emailing: http://www.Winhost.com/about-Winhost-aup.aspx