ruby-on-rails - 保存设计用户时出现Rails EOFError(到达文件末尾)

标签 ruby-on-rails ruby-on-rails-3 smtp zoho

尝试创建用户时,我在生产中遇到此错误(我正在使用devise gem)。

EOFError (end of file reached):

我之前遇到此问题,这是由于我使用zoho mail的smtp设置。

我相信下面的配置可以解决问题:
ActionMailer::Base.delivery_method = :smtp  
ActionMailer::Base.smtp_settings = {            
  :address              => "smtp.zoho.com", 
  :port                 => 465,              
  :domain               => 'example.com',   
  :user_name            => 'user@example.com',
  :password             => 'password',         
  :authentication       => :login,
  :ssl                  => true,
  :tls                  => true,
  :enable_starttls_auto => true    
}

现在,我们已将SSL添加到该站点,并且我相信这是导致此错误现在发生的原因。

是否有人对使用SSL的此错误或zoho mail smtp设置有任何了解?

最佳答案

此错误是由于我的config / initializers / devise.rb没有为config.mailer_sender指定正确的电子邮件地址引起的。

关于ruby-on-rails - 保存设计用户时出现Rails EOFError(到达文件末尾),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16819801/

相关文章:

mysql - Mac OSX/MySQL 5.6.19 上为 "Mysql2::Error: Lost connection to MySQL server during query"

java - Spring Web 应用程序通过本地主机上的 Gmail 发送电子邮件,而不是服务器

python - 从Python发送邮件而不使用第三方SMTP ("direct-to-MX")

ruby-on-rails - 如何调试 rails 3 gem?

ruby-on-rails - 无法在我的表单中添加第二个下拉菜单

mysql - ruby rails : Why first active record query takes longer?

mysql - ruby rails : How do I execute a function before saving to the database?

windows - 如何在 Windows 上安装 Email::Sender?

ruby-on-rails - rails 4 :TypeError - no implicit conversion of String into Integer

ruby-on-rails - 如何更改值在 View 中的显示方式?