Links
ActionMailer TLS
Categories
ActionMailer TLS
This plugin allows ActionMailer to work with SMTP servers that require TLS. It is heavily monkeypatched into ActionMailer and Net/SMTP, but such is life. Just set the following, and proceed as usual:
ActionMailer::Base.server_settings[:tls] = true
I haven’t quite figured out the best way to test this plugin, but if you execute the following command, you should receive a gmail from yourself, and a fair amount of debug information will be output. I hope it suffices; if not, suggest an improvement!
rake EMAIL=my_gmail_account@gmail.com PASSWORD=secret
Vitals
| Repository | http://svn.douglasfshearer.com/rails/plugins/action_mailer_optional_tls |
|---|---|
| License | Rails' (MIT) |
| Tags |
foxmail GAYD gmail mail ssl tls
|
| Rating | (13 votes) |
| Owner | Kyle Maxwell |
| Created | 22 August 2006 |
Comments
-
Nice work!
Only problem it seems to throw a SSL exception "Wrong Version number" right after the email was accepted by the SMTP server, when used with an gmail account (tested with Ruby 1.8.6, Rails 1.2.3 that is).
-
Hello, that's a great sample! Though it seems to fail for me (ruby 1.8.5 with rails 1.2.3)
While testing, I get this error: testsendmail(TlsTest): Errno::EBADF: Bad file descriptor - connect(2) lib/smtp_tls.rb:34:in
initialize' lib/smtp_tls.rb:34:inopen' lib/smtp_tls.rb:34:indo_tls_start' c:/ruby/lib/ruby/1.8/timeout.rb:56:intimeout' c:/ruby/lib/ruby/1.8/timeout.rb:76:intimeout' lib/smtp_tls.rb:34:indotlsstart' lib/smtp_tls.rb:18:insend' lib/smtp_tls.rb:18:instart' lib/smtp_tls.rb:10:instart' lib/action_mailer_tls.rb:9:inperformdeliverysmtp' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:451:insend' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:451:indeliver!' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.3.3/lib/action_mailer/base.rb:333:inmethod_missing' ./test/tls_test.rb:30:intestsendmail'I wonder if you possibly could suggest anything...
Thanks a lot!
-
The repository seems to have disappeared.
-
The test didn't work - it seems to assume it has root access to the db or somefink.
But the actual emailing worked like a treat :) :)

