狂欢邮件方法不起作用? [英] Spree Mail Method is not working?
问题描述
在配置菜单下的spree管理面板中,我配置了邮件smtp,端口等,在创建新邮件方法后按下测试邮件按钮,我收到以下警报消息测试邮件发送成功",甚至终端窗口也显示电子邮件发送消息成功,但邮件没有投递到相应地址
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
发送测试邮件后的控制台日志
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.
推荐答案
请检查
默认情况下,Spree 中的邮件传递是禁用的.您可以通过两种方式启用它.
Mail delivery in Spree is disabled by default. You can enable it in two ways.
首先,如果您需要保留默认的 Rails 应用操作邮件程序配置,您需要通过将 override_actionmailer_config
选项设置为 false
来告诉 Spree 不要覆盖它们.
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
.
您还应该使用 mails_from
选项告诉 Spree 哪个电子邮件应该放在标题中.禁用所有 Spree 默认邮件设置和拦截器的典型 spree 初始值设定项如下所示:
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
参考 狂欢邮件投递
请告诉我
这篇关于狂欢邮件方法不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!