I am using Zoho mail to send email from my Rails application. But I am getting EOFError - end of file reached error when trying to send email. Below is my configuration for 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 => '[email protected]',
:password => 'zoho_mail_password',
:authentication => :login,
:ssl => true,
:tls => true,
:enable_starttls_auto => true
}
Here is error from my log file
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'
Please help.
CodePudding user response:
I managed to solve the problem. I had to set the default address in application_mailer.rb file
default from: 'Business Name <[email protected]>'
