asp.net - How to implement bulk mailing using windows service on a schedule basis? -


i've requirement in need send 10000+ mails on quarterly basis. purpose used windows service triggers every day , executes mailing functionality after third month. i've fetch last 3 months records database , need send 1 mail each record.

the problem faced mail server used not allow bulk mailing.

how can providing delay between each sent (20 mails per minute)?

there many way archieve this. once had similar requirement , solved via home grown service, fetch items special database table (mail queue) , sent each mail individially. queue filled on time regular business logic. necessary locking can done via db: schedule column stores expected scheduled time of sending mail. way service collects mails wich 'ready' sending. after successfull send, column (sent_timestamp) used mark success.

we implemented whole service in asp , triggered via regular windows task planner jobs. in case, service start every minute , queue provide next 20 mails. easier way utilize sql server jobs. sql server capable of delivering mails local smtp server well.

if not done yet, please note question well: what best way send large batches of emails in asp.net?


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -