I need a really simple way to execute a method asynchronously in an ASP.NET Web Forms C# website.
This method will be passed the email information (from, to, subject, body, etc) - and then send the email in the background - allowing page execution to complete without having to wait for the email to send.
This will be called from various places in the app - sometimes multiple times in a loop (where the delay is more of a problem and can even lead to timeouts).
What would be a nice lightweight way to do this?
I have tried WebAPI examples on the web, such as this: http://www.asp.net/web-api/overview/advanced/calling-a-web-api-from-a-net-client
But it gets stuck at 'await':
HttpResponseMessage response = await client.GetAsync("api/products/1");
and also seems overkill for what I need.
Thanks.