我的目标:电子邮件的形式页面 - 如果用户按下发送它的电子邮件发送到管理员帐户发送电子邮件问题Amazon EC2上使用Rails应用程序
确定我跟着轨教程。
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'google.com',
user_name: 'MYACCOUNT',
password: 'MYPAASSWORD',
authentication: 'plain',
enable_starttls_auto: true }
# Print deprecation notices to the Rails logger.
设置这样,
和它的作品完美!在我的本地主机
但如果我部署到亚马逊ec2。这是行不通的,但nginx的服务器日志说没有错误:(
Processing by IndexController#send_email as */*
App 2705 stderr: Parameters: {"contactName"=>"asfsdf", "email"=>"[email protected]", "comments"=>"asdf", "submitted"=>"true"}
App 2705 stderr:
App 2705 stderr: Sent mail to [email protected] (10.9ms)
App 2705 stderr: Date: Sat, 22 Feb 2014 01:49:08 +0000
App 2705 stderr: From: [email protected]
App 2705 stderr: Reply-To: [email protected]
App 2705 stderr: To: [email protected]
App 2705 stderr: Message-ID: <[email protected]>
App 2705 stderr: Subject: asfsdf***** MAIL FROM MY SITE******
App 2705 stderr: Mime-Version: 1.0
App 2705 stderr: Content-Type: text/plain;
App 2705 stderr: charset=UTF-8
App 2705 stderr: Content-Transfer-Encoding: 7bit
我认为这不是一个代码问题的辩论,因为这是工作的罚款在我的本地
我认为我有?设置配置在EC2一些地方
你能不能帮我这个谢谢