OpenSSL::SSL::SSLError (hostname "smtp.gmail.com" does not match the server certificate)

When I deployed my rails app with cent os6 while sending email it is
giving
me 'OpenSSL::SSL::SSLError (hostname “smtp.gmail.com” does not match the
server certificate) ,

This is my mailer settings
config.action_mailer.smtp_settings = {
address: ‘smtp.gmail.com’,
port: 587,
domain: ENV[‘DOMAIN_NAME’],
authentication: ‘plain’,
enable_starttls_auto: true,
user_name: ENV[‘GMAIL_USERNAME’],
password: ENV[‘GMAIL_PASSWORD’],
openssl_verify_mode: ‘none’
}

Let me know if any one can help . Thanks in advance.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs