Railsでメッセージを配信するための小さな連絡フォームを作成しました。私はRails-ActionMailerのガイド(http://guides.rubyonrails.org/action_mailer_basics.html5.2 Action Mailer Configuration for GMail
)に厳密に従いました。特に、この目的でGmailを使用したいのでPointを使用しました。
私は開発環境にいます。
問題:特定のメールアドレスにメッセージが表示されません。
私が見つけたものをチェックするときdevelopment.log
:
Sent mail to // the specific email-address appears
Date: Thu, 28 Feb 2013 13:26:37 +0100
From: // my gmail account
To: rt@netlogix.de
Message-ID: <512f4cfdc419c_1b2020e4ab495633@PC-MYNAME.mail>
Subject: The Subject
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
私は何かが足りないのですか、それとも私が開発中であるためですか?前もって感謝します!
編集:
構成は次のdevelopment.rb
とおりです。
# Configuring GMAIL
config.action_mailer.delivery_method = :smtp
config.action_mailer.default_url_options = { :host => 'localhost:3000'}
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "localhost:3000",
:user_name => "myemailaddress@gmail.com",
:password => "myPW",
:authentication => "plain",
:enable_starttls_auto => true
}
編集2:
ファイアウォールが問題である可能性があると思ったので、プロジェクトをherokuにプッシュしました。配信はまだ失敗しますが、ログは次のとおりです。
Processing by MessagesController#create as HTML
Sent mail to (email-adress) (690ms)
Completed 500 Internal Server Error in 712ms
Net::SMTPAuthenticationError (535-5.7.1 Please log in with your web browser and then try again.)