views:

49

answers:

2

How to limit the number of emails to send per tick cycle of the timer in ASP.NET Windows application?

+1  A: 

In general I would push the messages to be sent on a queue and run a thread which every timer tick pulls maximum N messages from the queue.

In this way you can maximally send N messages per timer tick, and you can easily monitor if the thread can keep up.

An additional advantage is that the thread sending the email can immediately continue whatever it was doing.

Peter Tillemans
A: 

You could use the MSPickupFolder and let the MailServer do the limitation

citronas