【问题标题】:Rails 3 + sendmail on snow leopardRails 3 + 雪豹上的 sendmail
【发布时间】:2012-03-14 06:27:08
【问题描述】:

这是我用于 action mailer 的 development.rb 文件配置

config.action_mailer.delivery_method = :sendmail config.action_mailer.raise_delivery_errors = true config.action_mailer.perform_deliveries = true

在 ubuntu 上一切正常,但在雪豹上它什么也没做。 这是终端的 WEBrick 输出

Sent mail to razha_lesce@yahoo.com (840ms)
Date: Thu, 23 Feb 2012 21:36:00 +0200
from: Notificari eCatalog notificari@ecatalog.com
To: razha_lesce@yahoo.com
Message-ID: <4f4695208bf88_a098103d9102475@Lesce-Andreis-MacBook.local.mail>
Subject: Notificare Ecatalog
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Completed 200 OK in 3448ms (Views: 122.1ms | ActiveRecord: 164.8ms)

【问题讨论】:

    标签: ruby-on-rails ruby osx-snow-leopard sendmail


    【解决方案1】:

    您究竟希望在这里发生什么?除非您的 Mac postfix 客户端配置了中继主机以连接到整个 Internet 并执行投递,否则您通过本地 sendmail 投递的邮件根本不会投递到任何地方。正如您所注意到的,您可以在 WEBrick 的输出中查看邮件以验证其内容,但除非您采取进一步的步骤,否则它不会送达。

    【讨论】:

    • 您的 Ubuntu 配置有一个有效的后缀配置,可以连接到整个互联网,而您的 Mac 没有。如果您想将您的 Mac 配置为实际发送邮件,check out this blog post 会提供有关如何执行此操作的说明。
    猜你喜欢
    • 2010-11-02
    • 1970-01-01
    • 2012-12-10
    • 2011-03-05
    • 1970-01-01
    • 2011-12-04
    • 2011-04-17
    • 2012-01-10
    相关资源
    最近更新 更多