this is how when I need to send email gives me error. But the mistake that since gives me is this:
An asynchronous operation cannot be started at this tim
Not really replying your original question, but just wanted to stress that you are better off calling an email sending code without keeping the calling thread waiting. Although you are using async/await, in user's perspective, you are still waiting in the browser while the server is done sending emails. It may be few milliseconds, but still it's better to let this handled by a background worker.
So IMO, using HostingEnvironment.QueueBackgroundWorkItem(x=> SendEmail());
would be a better approach.
Having said that, you still have a slight risk of the asynchronous task being terminated if app domain recycles in the middle. But that's highly unlikely in your case I would say. Even if that happens, you can use a cancellation token and work your way around it.