"end of file reached" error in rails when using Action Mailer to send email with SMTP

"end of file reached" error in rails when using Action Mailer to send email with SMTP

Hello,

I've been having issues sending emails from my Rails app using the action mailer. This is my smtp configuration: 
    1. config.action_mailer.smtp_settings = {
    2.      address: "smtp.zoho.com",
    3.      port: "587",
    4.      domain: "domain.com",
    5.      user_name: "user@domain.com",
    6.      password: "ABCDEFG123",
    7.      authentication: :plain,
    8.      enable_starttls_auto: true
    9.    }

When I try to send an email I get this error for rails:
  1.     
    # continue looping
    when nil
    raise EOFError, 'end of file reached'
    end while true
    end
   
Does anyone know what's going on? Based on what I read this error is usually caused by the server not responding properly.