【问题标题】:Sendgrid mails not sent from crontabSendgrid 电子邮件不是从 crontab 发送的
【发布时间】:2013-11-28 21:20:29
【问题描述】:

我正在开发一个 RoR 应用程序。

我正在尝试从应用服务器上的 crontab 运行 shell 脚本。 shell 脚本调用一个 rake 任务,该任务应该传递邮件。该脚本运行良好并在从控制台运行时发送邮件,但在通过 crontab 运行时失败。

在 crontab 中运行脚本时出现以下错误:

rake aborted!
550 Cannot receive from specified address <help@voylla.com>: Unauthenticated senders not allowed

有人可以帮忙吗?谢谢

【问题讨论】:

    标签: ruby-on-rails email cron crontab


    【解决方案1】:

    如果您收到“不允许未经身份验证的发件人”错误,这意味着您的邮件服务器或程序在 SMTP 连接期间未尝试 AUTH LOGIN 命令。

    Unauthenticated senders not allowed 表示您提供bad username or password。 解决此问题的最简单方法是重置您的密码:

    https://sendgrid.com/user/forgotPassword

    请在config.action_mailer.smtp_settingActionMailer::Base.smtp_settings 设置上检查您的usernamepassword

    更多信息请查看

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

    在 development.rb 中也请检查

     config.action_mailer.delivery_method = :smtp
    

    【讨论】:

    • 我提供了正确的用户名和密码,因为在登台服务器上也是如此。如何调用AUTH LOGIN
    • 请查看我更新的帖子以检查您的环境文件中的config.action_mailer.delivery_method = :smtp
    猜你喜欢
    • 2018-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-08
    • 1970-01-01
    相关资源
    最近更新 更多