What is the best way to send large batches of emails in ASP.NET?

后端 未结 2 1115
青春惊慌失措
青春惊慌失措 2021-01-18 16:40

I\'m currently looping through a datareader and calling the System.Net.Mail.SmtpClient\'s Send() method. The problem with this is that it\'s slow. Each email takes about 5-1

2条回答
  •  情书的邮戳
    2021-01-18 17:27

    Definitely spawn it off on a background worker process so they go out asynchronously.

    BTW, 5-10 seconds per e-mail seems way slow to me. On my server it takes just fractions of a second per e-mail.

提交回复
热议问题