Postmarkapp の経験がある人はいますか?
Rails 2 アプリ (radiant cms) があり、SMTP 経由でメールを送信しようとしています。
これは私のsmtp設定がどのように見えるかです:
config.action_mailer.smtp_settings = {
:address => "smtp.postmarkapp.com",
:port => '25',
:authentication => :plain,
:user_name => 'postmark-ap-key',
:password => 'postmark-ap-key',
:domain => 'postmarkapp.com'
}
メーラークラス:
class RegistrationMailer < ActionMailer::Base
def send_email(email, sent_at = Time.now)
subject "Some text here"
recipients "#{email}"
from 'xxx@yxz.com'
sent_on sent_at
body :text => "Some text here"
end
end
そして、これがdeliverメソッドを呼び出すコードです(コントローラーアクションで):
mail = RegistrationMailer.create_send_email(params[:email])
RegistrationMailer.deliver(mail)
配信メソッドを呼び出すたびに、「接続が拒否されました - connect(2)」エラーが発生しました。誰でも私が間違っていることを手伝ってくれますか? herokuでまったく同じコードを他のsmtp設定(sendgrid用)で使用しましたが、問題なく動作しました。