smsohan / MvcMailer

A Mailer for ASP.Net MVC that forms the Email Body using MVC Views (Razor etc.) following Ruby on Rails ActionMailer style
MIT License
584 stars 178 forks source link

Feature Request: _MailViewStart.cshtml #22

Open laston opened 13 years ago

laston commented 13 years ago

I want something very simple: share layouts between mailers! Right now the only elegant way I found is @{ Layout = "~/Views/EmailLayouts/_Layout.cshtml"; }

At the beginning of each Email view. (Please tell me I'm wrong!) There ain't any real way to have a default Email layout. The Best way I can think is to have a _MailViewStart.cshtml together with the new _ViewStart.cshtml

Thanks for the lovely work!

Regards,

couellet commented 13 years ago

Maybe you can override MailerBase and set MasterName = "~/Views/EmailLayouts/_Layout.cshtml";