EOFError-使用Zoho邮件时到达文件末尾



我使用Zoho邮件从Rails应用程序发送电子邮件。但我在尝试发送电子邮件时遇到EOFError - end of file reached错误。以下是我对development.rb的配置

config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { host: 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address              => "smtp.zoho.com",
:port                 => 465,
:user_name            => 'info@mydomainname.com',
:password             => 'zoho_mail_password',
:authentication       => :login,
:ssl                  => true,
:tls                  => true,
:enable_starttls_auto => true
} 

这是我的日志文件中的错误

Completed 500 Internal Server Error in 7481ms (ActiveRecord: 2.1ms | Allocations: 44097)
EOFError - end of file reached:
app/controllers/users_controller.rb:19:in `create'

请帮忙。

我设法解决了这个问题。我不得不在application_mailer.rb文件中设置默认地址

default from: 'Business Name <info@mydomainname.com>'

最新更新