@home   @rss   @archive   @codeforpeople.com     @random   @radio[:m3u|:pls|:ruby]   @family   @neighbors  @twitter 

[Rails] Using ssl/tls with ActionMailer (gmail)

Using ActionMailer with tsl/ssl (for example with gmail) can be this easy



  #
  # step 1 - grab this tls patch for ruby’s net/smtp.rb lib
  #
    curl -s http://s3.amazonaws.com/drawohara.com.ruby/tls_smtp.rb > ./lib/tls_smtp.rb


  #
  # step 2 - put something like this into ./config/initializers/email.rb
  #

  require tls_smtp

  ActionMailer::Base.delivery_method = :smtp

  ActionMailer::Base.smtp_settings = {
    :address => smtp.gmail.com,
    :port => 25,
    :domain => yourdomain.com,
    :user_name => zaphod@yourdomain.com,
    :password => beeblebrox,
    :authentication => :plain,
  }
Comments (View)
blog comments powered by Disqus