rails email error - 530-5.5.1 Authentication Required.

后端 未结 2 1380
渐次进展
渐次进展 2020-12-21 09:41

trying to send email form Ruby on Rails but getting this:

SocketError in UsersController#create
getaddrinfo: nodename nor servname provided, or not known
         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-21 10:16

    I did the same using my Gmail, following are my configurations, try and see it if works

      config.action_mailer.default_url_options = { :host => 'localhost:3000' }
      ActionMailer::Base.smtp_settings = {
                        :address        => "smtp.gmail.com",
                        :port           => 587,
                        :authentication => :plain,
                        :user_name      => "@gmail.com",
                        :password       => "",
                        :openssl_verify_mode  => 'none'
      } 
    

    and please note the

    :openssl_verify_mode  => 'none'
    

    section to skip the SSL errors.

    But sorry, I have no idea what the error is, probably you try to use the Gmail SMTP server with another domain name.

提交回复
热议问题