Is is possible to use Actionmailer.Net.Standalone in a console application? I keep getting an error that:
Could not find any CSHTML or VBHTML views named [CRD.html.cshtml] in the path [EmailTemplates]. Ensure that you specify the format in the file name (ie: CRD.html.cshtml.txt.cshtml or CRD.html.cshtml.html.cshtml)
public class Mailer : RazorMailerBase
{
public override string ViewPath
{
get { return "EmailTemplates"; }
}
public RazorEmailResult Processed(string f)
{
From = group;
To.Add(user);
Subject = "CRD Process Server has processed file: " + f;
return Email("CRD.html.cshtml");
}
}

Do I need to implement a RazorViewEngine somewhere since it isn't standard with a console application?
A little late but maybe it still helps:
Try to change
return Email("CRD.html.cshtml");
to
return Email("CRD");
The extensions are appenden automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With