Spree Mail Method is not working?

旧街凉风 提交于 2019-12-04 05:29:01

问题


In spree admin panel under configuration menu, I configured mail smtp, port and etc., after creating new mail method I press test mail button, I got following alert message "Testmail sent successfully" and even terminal window also display email send successfully message but the mail is not delivered to the corresponding address

Console log after sending test mail

Sent mail to abc@xyz.com (5ms)
Date: Wed, 12 Jun 2013 03:11:43 -0700
From: test@spree.com
To: abc@xyz.com
Message-ID: <************************>
Subject: [["message"]] Spree Demo Site Testmail
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit

Congratulations!
================

If you have received this email, then your email settings are correct.

回答1:


Please check that

Mail delivery in Spree is disabled by default. You can enable it in two ways.

First, if you need to keep your default Rails app action mailer configs you need to tell Spree to not override them by setting the override_actionmailer_config option to false.

You should also tell Spree which email should go on the header from using the mails_from option. A typical spree initializer which disables all Spree default mail settings and interceptor looks like this:

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

refer spree mail delivery

Please let me know



来源:https://stackoverflow.com/questions/17063241/spree-mail-method-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!