How to Send Email in Development with Spree

后端 未结 4 1465
抹茶落季
抹茶落季 2020-12-19 18:57

I\'m in the development environment and I want to send out test emails via my console. I got the console going nice, but its not sending.

I go to Spree\'s Mail Metho

4条回答
  •  佛祖请我去吃肉
    2020-12-19 19:50

    Spree actually overrides the ActionMailer settings with the settings input in the graphical interface using the Spree::MailMethod class. On the plus side, you can set things in the admin interface, with a downside of several unexpected behaviours.

    We maintain many Spree stores and we always run with the settings:

    Spree.config do |config|
      config.override_actionmailer_config = false
      config.mails_from = "no-reply@yourdomain.com"
    end
    

    This will allow you to configure ActionMailer as you would in any other Rails application: http://guides.rubyonrails.org/action_mailer_basics.html#example-action-mailer-configuration

    This is being adopted as standard procedure for the next release of Spree after 2.2.x.

    https://github.com/spree/spree/pull/4377 has extracted the web configuration to its own gem to maintain backwards compatibility.

提交回复
热议问题