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
585 stars 176 forks source link

HTML Body PostProcessor (integrating PreMailer) #81

Open hernangm opened 11 years ago

hernangm commented 11 years ago

The best bet to styling html emails is to set the style attribute in the corresponding tags. However, most people usually have their style definitions in separate css files. There is plenty of documentation about this on the web (http://css-tricks.com/using-css-in-html-emails-the-real-story/).

So I have modified mvc.mailer so html body is passed through a list of configured post processors. One of this post-processor (based on the premailer library) removes style definition from the head tag and apply the rules to the corresponding tags in the body.

I followed the preprocessor pattern of SquishIt library. I hope this modification gets integrated to the master branch.

You've done a great job with Mvc.Mailer. I am using it in several projects. Thanks guys!

smsohan commented 11 years ago

Thanks for this. I'll probably need a bit if time to look at this, but I surely will.


Sent from my iPhone Sohan SM

On 2013-02-02, at 10:52 AM, Hernan Marano notifications@github.com wrote:

The best bet to styling html emails is to set the style attribute in the corresponding tags. However, most people usually have their style definitions in separate css files. There is plenty of documentation about this on the web ( http://css-tricks.com/using-css-in-html-emails-the-real-story/).

So I have modified mvc.mailer so html body is passed through a list of configured post processors. One of this post-processor (based on the premailer library) removes style definition from the head tag and apply the rules to the corresponding tags in the body.

I followed the preprocessor pattern of SquishIt library. I hope this modification gets integrated to the master branch.

You've done a great job with Mvc.Mailer. I am using it in several projects.

Thanks guys!

You can merge this Pull Request by running

git pull https://github.com/hernangm/MvcMailer master

Or view, comment on, or merge it at:

https://github.com/smsohan/MvcMailer/pull/81 Commit Summary

File Changes

Patch Links:

hernangm commented 11 years ago

Don't worry, take ur time.

darcythomas commented 10 years ago

Bump. I am planning manually including this fork into my project. However it would be great if you could merge this pull request in to the official nuget package. To ease maintainability etc.

Cheers:D

sheam commented 9 years ago

Is this dead?