I want to use Mailgun (or maybe Sendgrid) to send emails from my app.
This is pretty straightforward cause I can use RestSharp to interact with their api.
The problem lies in the fact that generating 开发者_StackOverflowan HTML email is a PITA if I cant use razor. I know there are two nuget packages (Postal, MvcMailer) that handle this problem quite nicely but they force me to use a SMTP server and I dont want or need that at all.
I just want to keep using the Mailgun API to send emails but I want to have a way to generate the markup for those emails using Razor.
How can I do this?
Please Help.
If you have a partial you can render it to a string, as in the following SO question: link
精彩评论