Rails 邮件发送程序发送失败

Rails 邮件发送程序发送失败

当我在 Rails 中使用密码恢复时,我在开发日志中看到以下内容:

Sent mail to [email protected] (1024ms)
Date: Sat, 21 Jul 2012 15:24:35 +0700
From: [email protected]
Reply-To: [email protected]
To: [email protected]
Message-ID: <[email protected]>
Subject: subj
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: base64

base64-encoded stuff here...

但邮件实际上从未送达。然而,当我直接通过 sendmail 发送邮件时,它工作正常:

echo 'this is a test' | mail -s test_email [email protected]

可能出了什么问题?我正在使用 Rails 3.2.3 和最新的 devise 版本(我猜 devise 与它无关,因为它可以正常形成消息,但仍然如此)。

答案1

您是否已告诉您的开发环境实际发送邮件?通常,这种事情在开发中是关闭的,特别是因为您通常不会在开发中传递邮件。

相关内容