当我在Rails中使用密码恢复时,我在开发日志中find了这个:
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]
什么可能是错的? 我使用最新的devise版本的Rails 3.2.3(我想devise与它没有任何关系,因为它形成了消息,但仍然)。
你有没有告诉你的开发环境实际提供邮件? 通常,这种事情在开发中被closures,因为你通常不想在开发中传递邮件。