ActionMailer: Default From: address?

前端 未结 6 1358
-上瘾入骨i
-上瘾入骨i 2020-12-15 07:40

Googled for this to no avail. Didn\'t find anything in the API either. I was expecting some kind of class method or configuration option to set it...

So, rather than

6条回答
  •  半阙折子戏
    2020-12-15 08:03

    In Rails 3:

    config/environments/development.rb:

    ActionMailer::Base.default :from => 'default@development-server.com'
    

    config/environments/production.rb:

    ActionMailer::Base.default :from => 'default@production-server.com'
    

提交回复
热议问题