我想我已经组建的ActionMailer成功,但邮件没有在他们到达收件箱时,尽管服务器说明不同:Rails应用程序可以从本地主机发送电子邮件吗?
Sent mail to [email protected] (2003ms)
Date: Fri, 30 Aug 2013 22:26:41 +0100
From: [email protected]
To: [email protected]
Message-ID: <[email protected]>
Subject: Welcome to my awesome site!
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html>
<html>
<head>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
</head>
<body>
<h1>Welcome to example.com, Julian</h1>
<p>
You have successfully signed up to example.com,
your username is: gogo.<br/>
</p>
<p>
To login to the site, just follow this link: http://example.com/login.
</p>
<p>Thanks for joining and have a great day!</p>
</body>
</html>
我需要我的Rails应用程序上传到服务器或Heroku的序的电子邮件将被寄出?我知道这是PHP邮件和MAMP/XAMPP的情况。
你envt中的你的smtp设置是什么? – Raghu
在发布之前做一些研究:http:// stackoverflow。com/questions/1789032/send-email-from-localhost –
我使用链接Bruno Ferreira提供的从本地主机发送邮件(通过Gmail),工作得很好:) –