ssl - Gmail smtp Hostname does not match the server certificate -
ssl - Gmail smtp Hostname does not match the server certificate -
i'm having error gmail
gem while trying send mail, working fine on local, , working fine on heroku, im moving app vps server. error:
e = g.compose 'test@gmail.com' subject 'testasea' body 'test' end => #<mail::message:25450040, multipart: false, headers: <from: .......> e.deliver! => openssl::ssl::sslerror: hostname not match server certificate
i've added initializer file, without luck:
actionmailer::base.smtp_settings = { :enable_starttls_auto => true, :openssl_verify_mode => 'none' # i've tested 0 , false,
}
i tried monkey path class
openssl::ssl::sslsocket.class_eval def post_connection_check(hostname) homecoming true end end
with no luck, when receive 535 wrong authentication data
, know info ok because can do
g.inbox.count :read
and returns me right number.
i know:
the wrong certificate 1 server (smtp client) sending? or 1 received gmail smtp server? why works in local? why if monkey path class received authentication error? is there workaround? dont care if not safe, tenting application,.
this guess, if in whm vps
there function restricts outgoing smtp connections, can find in tweak settings.
restrict outgoing smtp root, exim, , mailman (fka smtp tweak)
it redirects smtp connections, if enabled receive server self-signed ssl certificate, , if bypass using monkey patch or setting configuration dont check ssl certificate found authentication error in fact connecting local smtp server.
just disable , test again.
ssl ruby-on-rails-3.2
Comments
Post a Comment