I have been attempting to get Gmail SMTP mail working on both Heroku
(1.8.6) and my local dev (1.8.7).

Unfortunately using the plugin fails locally, so I updated the gmail
plugin slightly as follows to use the built in TLS support in Ruby
1.8.7 (based off an older post linked at bottom), and figured I would
post in case anyone else found it useful.




------ init.rb

rb_version = RUBY_VERSION.scan(/([0-9]+)\.([0-9]+)\.([0-9]+)/)[0]

require "smtp_tls" if (rb_version[0].to_i <= 1 && rb_version[1].to_i
<= 8 && rb_version[2].to_i <= 6)
require 'actionmailer_gmail'


------ actionmailer_gmail.rb (example, NOTE the :enable_starttls_auto
=> true)

ActionMailer::Base.smtp_settings = {
        :address => "smtp.gmail.com",
        :port => 587,
        :authentication => :plain,
        :domain => "localhost.localdomain",
        :enable_starttls_auto => true,
        :user_name => "[email protected]",
        :password => "password",
}





------ Old Thread

(I had some issues with the code posted here.)
http://groups.google.com/group/heroku/browse_thread/thread/14779ef5213ea8d5/9d6ddd20b84e5d97?lnk=gst&q=gmail+#9d6ddd20b84e5d97


------ Alternate Fixes

There is also an open GitHub issue I found with a quick fix (instead
of using the built in support) in case anyone wants to go that way.
http://github.com/adamwiggins/gmail_smtp/issues#issue/1

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to