One thing that I donโt understand when sending Async emails from an ASP.NET page is that when we call SendAsync, it must be executed in a separate thread so that our page can continue the execution thread and complete its response no matter how long it takes to send accept.
How can we call a method on one page using SendCompletedEventHandler ? By then, the page object might not exist, and there are examples on this forum that people do this.
I expected that I could have a separate class that could have a static method that I would execute on the SendCompletedEventHandler , and that way we could report possible errors. However, when I raise an exception, the exception comes as part of the Response. Therefore, for me it looks like this: SendAsync works in one thread, on the waites page to execute it, and returns with information about any errors that occurred.
How should it be? So what does asink mean?
Totally confused ... Can anyone help?
UPDATE: Found a message that helped me a lot HERE LINE
source share