asp.net2.0群发邮件超时问题
以下是最初的代码:
string list = Request.Form.Get( "useremail ");//这里得到的是a,b,c,....可能有几万个邮箱地址
System.Net.Mail.MailMessage myEmail = new System.Net.Mail.MailMessage(txtFormEmail.Text.Trim(), list, txtTitle.Text.Trim(), this.txtContent.Text.Trim());
SmtpClient smtp = new SmtpClient( "smtp.yahoo.com ");
smtp.UseDefaultCredentials = false;
smtp.Credentials = new System.Net.NetworkCredential( "sa@sa.com ", "sasasa ");
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Send(myEmail);
Response.Write( " <script> alert( '群发成功! '); </script> ");
几万条群发的超时怎么解决?有什么解决方法 可以给出代码参考么 (是
asp.net2.0的发邮件啦)
[解决办法]
晕,忘记说地址,http://www.cnblogs.com/ustbwuyi
[解决办法]
这种工作不建议放在asp。net页面中执行,你可以做个windows服务。让服务来定时跑