开发者

dynamically changing ActionMailer::Base.delivery_method

开发者 https://www.devze.com 2023-01-15 04:11 出处:网络
开发者_开发问答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
开发者_开发问答

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

精彩评论

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