Closed regenrek closed 11 years ago
I could solve the problem somehow. Not very clean but it works. What I did was to extended the .Send() method with the ControllerContext.
So i ended up with this
dynamic email = new Email("notification");
email.<foo> = "lorem@ipsum.com";
// and so on
emailService.Send(email, ControllerContext); // I use the ControllerContext from the Current Controller
// After sending the E-Mail I'm updating the RouteData with the Current Controller
ControllerContext.RequestContext.RouteData.Values["controller"] = "Notification";
Hi,
after upgrading from MVC3 to MVC4 (I think thats the time where the issue came up...) I got an error when I want to send the mail.
Here my test code:
It looks like the error is here EmailViewRenderer.cs - viewEngines.FindView(controllerContext <-- is null)
![Uploading Unbenannt-1.png . . .]()