EOFError - 使用 Zoho mail 时到达文件末尾
EOFError - end of file reached when using Zoho mail
我正在使用 Zoho Mail 从我的 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>'
我正在使用 Zoho Mail 从我的 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>'