Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dblock/actionmailer-text
Automatically insert a text/plain part into your HTML multipart e-mails.
https://github.com/dblock/actionmailer-text
Last synced: 17 days ago
JSON representation
Automatically insert a text/plain part into your HTML multipart e-mails.
- Host: GitHub
- URL: https://github.com/dblock/actionmailer-text
- Owner: dblock
- License: mit
- Created: 2015-04-07T13:07:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-15T20:29:48.000Z (about 6 years ago)
- Last Synced: 2024-10-08T23:10:50.306Z (about 1 month ago)
- Language: Ruby
- Size: 16.6 KB
- Stars: 17
- Watchers: 5
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
ActionMailer::Text
==================[![Build Status](https://travis-ci.org/dblock/actionmailer-text.svg?branch=master)](https://travis-ci.org/dblock/actionmailer-text)
[![Gem Version](https://badge.fury.io/rb/actionmailer-text.svg)](http://badge.fury.io/rb/actionmailer-text)Automatically insert a text/plain part into your HTML multipart e-mails.
## Installation
```ruby
gem 'actionmailer-text'
```## Usage
```ruby
class WelcomeMailer < ActionMailer::Base
include ActionMailer::Textdefault from: '[email protected]'
def welcome(user)
@user = user
mail(to: @user.email, subject: 'Welcome!') do |format|
format.html { render 'welcome' }
end
end
end```
## Details
The MIME standard allows systems to send e-mail with multiple parts: plain/text for business-efficient devices such as the Blackberry, and text/html for web-based e-mail readers, such as GMail. Furthermore, ActionMailer supports multiple template formats: create an .html.haml template along with a .txt.haml template to generate both. We also know that text/plain email helps deliverability, but we believe a disproportionately small amount of text e-mails are actually read - the vast majority of devices are capable of parsing some HTML. This gem lets you get the text/plain part for free.
See [this blog post](http://artsy.github.io/blog/2012/05/16/generating-automatic-plain-text-mime-parts-with-rails-actionmailer) for details.
## Contributing
See [CONTRIBUTING](CONTRIBUTING.md).
## Copyright and License
Copyright (c) 2015, Daniel Doubrovkine, Artsy and [Contributors](CHANGELOG.md).
This project is licensed under the [MIT License](LICENSE.md).