I'm using the ActionMailer.Net.Standalone package in a class library. In the root of the project I have a folder called "Templates" where I have my file OrderConfirmation.html.cshtml.
Like this:
Here is my mailer class:
public class Mailer : RazorMailerBase, IMailer
{
public RazorEmailResult OrderConfirmation(string toAddress, Order order)
{
To.Add(toAddress);
From = "foo@bar.com";
Subject = "Account Verification";
return Email("OrderConfirmation", order);
}
public override string ViewPath
{
get { return "Templates"; }
}
}
When I run the project, I get the following error
"Could not find any CSHTML or VBHTML views named [OrderConfirmation] in the path [Templates]. Ensure that you specify the format in the file name (ie: OrderConfirmation.txt.cshtml or OrderConfirmation.html.cshtml)"
I'm guessing the path isn't correct. What path should I be using?
Thanks.