Rails : Error Message: end of file reached

Rails : Error Message: end of file reached

Hi,

I am trying to send an email using ZOHO credentials from the rails application. For this I have used SSL certificate for my application. When I trying to sending an email, getting following error.

  1. Could not send email to MY_EMAIL_ID
  2. Error Message: end of file reached
  3. /home/parthiv/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/openssl/buffering.rb:174:in `sysread_nonblock'
  4. /home/parthiv/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/openssl/buffering.rb:174:in `read_nonblock'
  5. /home/parthiv/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/protocol.rb:153:in `rbuf_fill'
  6. /home/parthiv/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/protocol.rb:134:in `readuntil'
  7. /home/parthiv/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/protocol.rb:144:in `readline'

production.rb

My zoho credentials are
  1.   config.action_mailer.smtp_settings = {
  2.       address: "smtp.zoho.com",
  3.       port: 465,
  4.       domain: "MY_DOMAIN_NAME",
  5.       user_name: "ZOHO_EMAIL_ID",
  6.       password: "ZOHO_PASSWORD",
  7.       authentication: :plain,
  8.       ssl:            true,
  9.       tls:            true,
  10.       enable_starttls_auto: true
  11.   }
I have changed the value of config.mailer_sender in config/initializers/devise.rb but no luck.

Changed

  1. config.mailer_sender = Settings.try(:mail).try(:from)
     to     
  1. config.mailer_sender = 'ZOHO_EMAIL'