Reputation: 513
In my MVC 3 Razor application, an ActionResult Create() method in the Controller handles a user HttpPost. At that point:
Since emailing is the most time-consuming activity, I'm attempting to use SmtpClient.SendAsync(), rather than SmtpClient().Send.
Is this scenario possible if inheritance is from AsyncController? Can anyone provide an example?
Thanks,
Arnold
Upvotes: 7
Views: 3909
Reputation: 4120
You should definitely check out MVC Mailer. Very nice tool to create emails with razor views. It has an option to send mails asynchronously. MVC mailer is also available via nuget.
Upvotes: 9