Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More readme updates

  • Loading branch information...
commit e2ebf23fce2ff98a3c5a2200cb0dfcc82a553002 1 parent 4f4142f
@jimneath jimneath authored
Showing with 23 additions and 2 deletions.
  1. +1 −1  MIT-LICENSE
  2. +2 −1  lib/shemail/inline_styles.rb
  3. +20 −0 readme.textile
View
2  MIT-LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 [name of plugin creator]
+Copyright (c) 2009 Jim Neath / Purify
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
3  lib/shemail/inline_styles.rb
@@ -55,7 +55,8 @@ def css_rules
# Find the css file
def css_file
- css = @css.to_s.ends_with?('.css') ? @css.to_s : "#{@css}.css"
+ css = @css.to_s
+ css = css[/\.css$/] ? css : "#{css}.css"
path = File.join(RAILS_ROOT, 'public', 'stylesheets', css)
File.exist?(path) ? path : raise(CSSFileNotFound)
end
View
20 readme.textile
@@ -4,6 +4,20 @@ WARNING: NOT READY FOR PRODUCTION USE YET. YOU HAVE BEEN WARNED.
Shemail tries to make sending HTML emails a little less painful.
+It was developed for use on "Purify: Awesome Bug & Issue Tracking":http://purifyapp.com
+
+h3. Background
+
+Writing inline styles for HTML emails is dull and boring but unfortunately
+a necessary evil. Rather than do it by hand we thought it would be nicer
+to let our app do it for us.
+
+We originally tried to use "awesome_email":http://github.com/imedo/awesome_email but unfortunately it
+either didn't work or was suspiciously slow (we're talking a minute to send
+the email).
+
+So we decided to write our own lightweight alternative. Enjoy.
+
h3. Install
First install the dependencies:
@@ -14,3 +28,9 @@ Then install Shemail to your rails app:
<pre><code>script/plugin install http://github.com/purify/shemail</code></pre>
+h3. Usage
+
+h3. Useful Resources Regarding HTML Emails
+
+* "Email Design Guidelines":http://www.campaignmonitor.com/design-guidelines/
+* "Guide to CSS support in email clients":http://www.campaignmonitor.com/css/
Please sign in to comment.
Something went wrong with that request. Please try again.