This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit ecf34d2bb7cf2f620c9508a60e29276b6a527c16
tree 299412b8a45ff45434a2586c83dfaab1f61cfb82
parent 4c4db7e098d54b2239c1ce7c195417552718418c
tree 299412b8a45ff45434a2586c83dfaab1f61cfb82
parent 4c4db7e098d54b2239c1ce7c195417552718418c
| name | age | message | |
|---|---|---|---|
| |
History.txt | Wed Feb 11 09:36:06 -0800 2009 | |
| |
LICENSE | Wed Feb 11 09:29:57 -0800 2009 | |
| |
NOTICE | Wed Feb 11 09:29:57 -0800 2009 | |
| |
README.markdown | ||
| |
Rakefile | Tue Feb 10 00:13:49 -0800 2009 | |
| |
VERSION.yml | Wed Feb 11 09:36:06 -0800 2009 | |
| |
action_mailer_tls.gemspec | Wed Feb 11 09:36:09 -0800 2009 | |
| |
generators/ | Tue Feb 10 00:13:49 -0800 2009 | |
| |
lib/ |
README.markdown
ActionMailerTLS
Background
This gem makes it trivial to send email through a Gmail account or a Google Apps for business email account.
This gem will only work on Ruby 1.8.6. If you're on Ruby 1.8.7 and Rails >= 2.2.1, you don't need this gem. See Notes below.
Installation
To install the gem (the preferred way):
sudo gem install openrain-action_mailer_tls -s http://gems.github.com./script/generate action_mailer_tls- Copy RAILS_ROOT/config/smtp_gmail.yml.sample to RAILS_ROOT/config/smtp_gmail.yml
- Update the configuration file with your settings
To (optionally) vendor this gem:
- Add the following entry to config/environment.rb
- config.gem "openrain-action_mailer_tls", :lib => "smtp_tls.rb", :source => "http://gems.github.com"
- rake gems:unpack
To install the plugin (the old way):
./script/plugin install git://github.com/openrain/action_mailer_tls.git -r 'tag v1.0.0'- Copy vendor/plugins/action_mailer_tls/sample/smtp_gmail.rb to config/
- Copy vendor/plugins/action_mailer_tls/sample/mailer.yml.sample to config/
- Update the configuration file with your settings
Testing it out
./script/generate mailer Notifier hello_world- Add the following lines to config/environments/development.rb
- config.action_mailer.raise_delivery_errors = true
- config.action_mailer.perform_deliveries = true
- config.action_mailer.delivery_method = :smtp
- Update the recipients and from fields in app/models/notifier.rb
./script/consoleNotifier.deliver_hello_world!
Resources
Blog posts
Books
- This gem was also featured in Advanced Rails Recipes pg. 238, Recipe #47.
Notes
If you're running Rails >= 2.2.1 [RC2] and Ruby 1.8.7, you don't need this gem. Ruby 1.8.7 supports SMTP TLS and Rails 2.2.1 ships with an option to enable it if you're running Ruby 1.8.7.
To set it all up, in config/initializers/smtp_gmail.rb, make sure to set :enable_starttls_auto to true.
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:authentication => :plain,
:enable_starttls_auto => true,
:user_name => "noreply@gmail_or_your_google_domain.com",
:password => "chucknorris"
}
For more information on this feature, check out the commit log
Author
- Marc Chung - marc [dot] chung [at] openrain [dot] com








