开发者

Using Remail gem with ruby on rails 3

Have anyone made Remail to work with Ruby on Rails. I am trying to set it up, but it throws Errno::ECONNREFUSED (Connection refused - connect(2)): while sending an email. I followed the instructions in the this page.

environment.rb

Emailsample:开发者_StackOverflow:Application.configure do
  config.action_mailer.delivery_method = :remail
  config.action_mailer.remail_settings = {
    :app_id  => "my-gae-app-id",
    :api_key => "3d4f1a200e5811e081e00800200c9a66"
  }
end


In Rails 3, you shouldn't change the environment.rb file. Write your configuration in the application.rb file instead.

Enter the following configurations in the application.rb file, within the class Application < Rails::Application section.

config.action_mailer.delivery_method = :remail
config.action_mailer.remail_settings = {
  :app_id  => "my-gae-app-id",
  :api_key => "3d4f1a200e5811e081e00800200c9a66"
}

Also, make sure the Gem is listed in the Gemfile file and you run bundle install.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜