There are a few similar questions. I just want to clarify one part.
If I want to send an e-mail (up to 30) in response to user's action, what execution context do I do it from?
Do I do a sync call (mail server is in the same data center, so actual sending is fast)?
Do I spawn a thread and send it from there? such that each user-request-to-send mail gets handled by a new thread?
- Do I have a background thread that handles a queue of e-mails?
The biggest issue I think, is that it is a shared web hosting. So I don't know what's a good way to install/start a windows service, or start a dedicated thread.
Details: ASP.NET MVC app, hosted on IIS 7.0 integrated mode, on discountasp.net using discauntasp.net smtp server.
Is there a better way? What's a "standard" way to accomplish this?