MailMatic
MailMatic is a mashup of tools designed to help you create self-contained HTML emails, with inlined styles. It uses StaticMatic to let you develop your emails using Haml, Sass, and Compass. It then uses Premailer to convert your generated HTML into HTML without external stylesheets, where all the style information is inlined as HTML attributes. This is critical for creating HTML emails that work well.
Installation
Install the gem:
gem install mailmatic
Initialize a directory where you will manage your static emails, e.g.:
mailmatic setup my_emails_dir
This generates a StaticMatic project directory structure. You can now edit your layouts, pages, and stylesheets under the ‘src` directory. You create new emails by creating documents under the `pages` directory. You can make subdirectories under here, and you can create partials that start with an underscore.
NOTE: All of your Haml files should be named ‘filename.haml`, NOT `filename.html.haml`.
For information on the use of partials, layouts, and helpers, see StaticMatic’s documentation at staticmatic.rubyforge.org/how_to_use.html
Once you are ready to generate the emails, run:
mailmatic build my_emails_dir
Then, you will see all of your generated emails in the ‘my_emails_dir/emails` directory.
Contributing to MailMatic
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it
-
Fork the project
-
Start a feature/bugfix branch
-
Commit and push until you are happy with your contribution
-
Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright
Copyright © 2011 Scott W. Bradley. See LICENSE.txt for further details.