I try to use the asynchronous SendAsync method of SmtpClient
public async Task SentMessageAsync(ApplicationUser user, string title, string text) { MailMessage mail = new MailMessage(SiteFromAdress, new MailAddress(user.Email)); mail.IsBodyHtml = true; mail.Subject = title; mail.Body = text; await smtpClient.SendAsync(mail, new object()); } Where await smtpClient.SendAsync studio swears on ожидание 'void' невозможно .
Is it possible to do sending emails asynchronously? And why the studio swears?