ruby-on-rails-4 – Mandrill SMTP提供EOFError:文件结束时出现
发布时间:2020-12-17 02:25:28 所属栏目:百科 来源:网络整理
导读:我们使用Mandrill从我们的Rails应用程序(在Heroku上)发送交易电子邮件. # config/environments/production.rbconfig.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address = "smtp.mandrillapp.com",:port = 587,:enable
我们使用Mandrill从我们的Rails应用程序(在Heroku上)发送交易电子邮件.
# config/environments/production.rb config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => "smtp.mandrillapp.com",:port => 587,:enable_starttls_auto => true,:user_name => ENV['MANDRILL_USERNAME'],:password => ENV['MANDRILL_PASSWORD'],:authentication => 'login',:domain => ENV['URL_OPTIONS_HOST'],} 当我们发送电子邮件时,我们将activeJob与deliver_later一起使用,在后台使用Resque发送电子邮件. 偶尔,也许每2-3天一次,我们会收到以下错误: EOFError: end of file reached File "/app/bin/rake" line 8 in <main> .... "queue_name": "production_mailers","job_class": "ActionMailer::DeliveryJob" 我认为这是由Mandrill的SMTP超时问题引起的. 有谁知道如何避免这个错误?是否最好重试失败的电子邮件,如果是这样,如何使用ActiveJob和Resque实现这一目标? 解决方法
我也看到了这个问题.每次发送都不会发生这种情况,我的大多数发送都来自resque作业.我想知道这是在mandrill方面的短暂问题还是网络问题.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |