开发者

dynamically changing ActionMailer::Base.delivery_method

开发者_开发问答

I need some of my emails to go using "smtp" and some others using "sendmail". Is there a clean way to switch between delivery methods depending on the mailer method?


You just need to define it with his configuration

ActionMailer::Base.delivery_method = :sendmail

And in other part of your app :

ActionMailer::Base.delivery_method = :smtp
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜