Skip to content

henrik/action_mailer_tls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ActionMailerTls
===============

Use GMail SMTP server to send emails in Rails ActionMailer

Example
=======

Put this in config/initializers/mail.rb:

    ActionMailer::Base.smtp_settings = {
      :address => "smtp.gmail.com",
      :port => 587,
      :domain => "mycompany.com",
      :authentication => :plain,
      :user_name => "username@mycompany.com",
      :password => "password"
    }

Better yet, keep your password outside of version control in a configuration YAML file (http://railscasts.com/episodes/85-yaml-configuration-file) like

    development:
      smtp_settings:
        address: smtp.gmail.com
        port: 587
        authentication: :plain
        ...

and just do

    ActionMailer::Base.smtp_settings = APP_CONFIG['smtp_settings'].symbolize_keys
    
or make a config/mailer.yml as described in http://www.danielfischer.com/2008/01/09/how-to-use-gmail-as-your-mail-server-for-rails/.

Copyright (c) 2008 Eladio Caritos, released under the MIT license.
Modifications by Henrik Nyh <http://henrik.nyh.se>.

About

Use Gmail SMTP server to send emails in Rails ActionMailer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages