Error Sending Emails with Ruby

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Error Sending Emails with Ruby

    I am currently using Ruby to send emails, but getting the below error when sending email.

    Code:
    Errno::ECONNREFUSED: Connection refused - connect(2)
    Following is the Code that sends out an email:

    Code:
    Reminder.new_event(event_owner.email).deliver!
    Following are the settings of my email;

    Code:
      config.action_mailer.delivery_method = :smtp
      config.action_mailer.smtp_settings = {
        :address => "smtp.gmail.com",
        :port => 587,
        :domain => "google.com",
        :authentication =>"login",
        :user_name => "email address",
        :password => "password",
        :enable_starttls_auto => true
      }
    Can anyone please help me to sort out this issue?

    #2
    Did you check it with other SMTP settings or to another email server, whether its working with them? Make sure and please let us know, if the issue is only with connecting to the Gmail server or all the other SMTPs.

    Comment


      #3
      I'd suggest you to try restarting the application, just make sure that you kill the process before you restart it. I think that should work.

      Comment

      Working...
      X