我試圖配置actionmailer通過谷歌應用程序與smtp發送。動作郵件程序SMTP谷歌應用程序
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "mydomain.com",
:user_name => "username",
:password => "password",
:authentication => 'plain',
:enable_starttls_auto => true }
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
但是每當gitlab嘗試發送電子郵件:
Sent mail to [email protected] (10ms)
Completed 500 Internal Server Error in 29ms
535-5.7.1 Username and Password not accepted
服務器運行紅寶石1.9.3p194。爲什麼Google應用不接受用戶名/密碼?
嘗試登錄到您的Gmail帳戶,您可能需要授予您的應用程序的權限 – 2012-07-29 05:13:05
@KyleC我已經嘗試過。我的應用程序是動作郵件程序。我需要授予SMTP權限嗎? – Jubei 2012-07-29 05:21:15
否....這些錯誤是發生在開發(本地計算機)還是生產中? – 2012-07-29 05:24:51