andrewdavey / postal

Email sending for asp.net mvc using the view engine system to render emails.
http://aboutcode.net/postal
MIT License
536 stars 169 forks source link

Request for change, pass viewname into send function #126

Open mulgurul opened 9 years ago

mulgurul commented 9 years ago

Hi

when using Postal with strongly typed model, then it would be of great benefit, that you could reuse a model with several different Views. This makes reusability easier.

I cannot do this today because the model name controls the Email view used for rendering. So you need to have a model per view class.

Could be solved by providing a overriden send function which takes the view class name as argument.

Thanks for a great package anyway.

Best regards

Peter Meldgaard

andrewdavey commented 9 years ago

Assuming your strongly typed model inherits from Email, can you just set the ViewName property?