2013-11-15 37 views
0

我在一個RoR應用工作發送。Sendgrid郵件不是來自crontab中

我試圖在應用服務器上運行,從crontab中的shell腳本。 shell腳本調用應該傳遞郵件的rake任務。腳本運行正常,從控制檯運行時發送郵件,但通過crontab運行時失敗。

rake aborted! 
550 Cannot receive from specified address <[email protected]>: Unauthenticated senders not allowed 

可能有人請幫助:

我在crontab中運行腳本時出現以下錯誤。由於

回答

0

如果你得到了「unathenticated發件人不允許」的錯誤,這意味着您的郵件服務器或程序的SMTP連接過程中沒有嘗試的AUTH LOGIN命令。

Unauthenticated senders not allowed意味着你提供無論是bad username or password。 解決這個最簡單的方法就是重置您的密碼:

https://sendgrid.com/user/forgotPassword

請檢查您usernamepasswordconfig.action_mailer.smtp_settingActionMailer::Base.smtp_settings設置

欲瞭解更多信息,請

http://community.sendgrid.com/sendgrid/topics/unauthenticated_senders_not_allowed

in development.rb請同時檢查

config.action_mailer.delivery_method = :smtp 
+0

我正在提供正確的用戶名和密碼,因爲同樣在分段服務器上工作。我怎樣才能調用'AUTH LOGIN'? – nish

+0

請查看我的更新後的帖子,以檢查環境文件中的config.action_mailer.delivery_method = smtp: –