我試圖給用戶發送確認郵件。Net :: SMTPAuthenticationError 502 5.5.2在Rails中ActionMailer
,但我得到以下錯誤:在production.rb
Net::SMTPAuthenticationError (502 5.5.2 Error: command not recognized
配置如下:
# Disable delivery errors, bad email addresses will be ignored
config.action_mailer.raise_delivery_errors = true
# set delivery method to :smtp, :sendmail or :test
config.action_mailer.delivery_method = :smtp
# these options are only needed if you choose smtp delivery
config.action_mailer.smtp_settings = {
:address => 'path_to_address_specified_by_my_hoster',
:port => 25,
:domain => 'my_domain.com',
:authentication => :plain,
:user_name => '[email protected]_domain.com',
:password => 'password'
}
我已經在我的託管服務提供商,創建命名在用戶配置文件郵箱「註冊@ my_domain .com「
對於已創建郵箱,他們向我發出登錄名和密碼:
login = verbose_login
password = verbose_password
我沒有完全明白user_name的確切格式。
我應該用
:user_name => "[email protected]_domain.com"
或:
:user_name => "signup"
或:
:user_name => "verbose_login"
或者該字段是針對郵件服務器,我要問的支持託管服務提供商的?
還有什麼區別:身份驗證=>:純文本和:登錄?
謝謝。
THX它可以幫助我。 :) – 2012-02-17 11:11:38