Task.Run vs. QueueUserWorkItem
Using ThreadPool.QueueUserWorkItem: Helps bypass limitations when trying to run async code inside IHttpModule. Does not interfere with the ASP.NET pipeline. Email sending does not block the main thread. Calling SendMailAsync().Wait() is safe here...
Apr 21, 20252 min read14
