|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
asp.net page send smtp mail too slowI have a web page that at the click of a button must send a bunch (1000+)
emails. Each email is sent individually. I have the code working fine, using Mail Message classes and smtp and all that. But sometimes even when I'm just sending one e-mail the web page takes a minutes or so to post. When there is 1000+ the page can sit there for 10 minutes or more... Can anyone tell me why it is so slow, or how to fix the problem? To address this I am thinking of just creating a queue table to write the emails to, then using a .net console app running via sql agent scheduled job to periodically send the emails in batch mode. However, I worry that this may also be slow? Does anyone have a better architecture for this solution? If so give me some ideas. Thanks! Hello,
if you have an SMTP server right on your ASP.NET computer, you could switch the send method of the Mail class from SMTP to Pickup directory. This way, the Mail object would just place a textfile in the pickup directory of the virtual SMTP server. Pretty fast. Best regards, Henning Krause Show quote "tparks69" <tpark***@discussions.microsoft.com> wrote in message news:98662E8D-3F01-4E38-9E53-94C83093C34A@microsoft.com... >I have a web page that at the click of a button must send a bunch (1000+) > emails. Each email is sent individually. I have the code working fine, > using Mail Message classes and smtp and all that. But sometimes even when > I'm just sending one e-mail the web page takes a minutes or so to post. > When > there is 1000+ the page can sit there for 10 minutes or more... Can anyone > tell me why it is so slow, or how to fix the problem? > > To address this I am thinking of just creating a queue table to write the > emails to, then using a .net console app running via sql agent scheduled > job > to periodically send the emails in batch mode. However, I worry that this > may also be slow? > > Does anyone have a better architecture for this solution? If so give me > some ideas. Thanks! |
|||||||||||||||||||||||