:この構成でActionMailer smtp_settingsで指定されたユーザ名からのみメールを送信できますか?私はこれを持って私のactionmailerの設定ファイルの
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "mail.foo.com",
:port => 25,
:domain => "foo.com",
:authentication => :email,
:user_name => "[email protected]",
:password => "foo1234567"
}
私だけ[email protected]
メールアドレスからメールを送ることができますか?もしそうなら、他のアドレスから電子メールを送信する方法はありますか?私は私のactionmailerのクラスでこれを持っている:
class Notifications < ActionMailer::Base
def answered_question(faq)
subject 'Your question has been answered'
recipients faq.email
from 'Foo <[email protected]>'
sent_on Time.now
content_type "text/html"
body :faq => faq
end
def completed_order(order)
subject 'Your order has been completed'
recipients order.email
from 'Foo <[email protected]>'
sent_on Time.now
content_type "text/html"
body :order => order
end
end
開発ではすべてが正常に出て動作しますが、生産にcompleted_order
電子メールが送り出されていません。
ありがとうございました。
ええ、それはサーバー構成の問題であることが判明しました。ありがとう! – vrish88