no usar el servidor imap del correo

This commit is contained in:
f 2018-02-26 21:03:10 -03:00
parent 0c5c1cb62e
commit 10fcc82fbf
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
2 changed files with 2 additions and 1 deletions

View file

@ -1 +1,2 @@
SECRET_KEY_BASE=
IMAP_SERVER=

View file

@ -26,7 +26,7 @@ module Warden
def imap_connect
# No vamos a enviar la contraseña en texto plano a ningún lado
@imap = Net::IMAP.new(@email.host_name, ssl: true)
@imap = Net::IMAP.new(ENV.fetch('IMAP_SERVER', 'kefir.red'), ssl: true)
# Errores más comunes según
# https://ruby-doc.org/stdlib-2.0.0/libdoc/net/imap/rdoc/Net/IMAP.html
rescue Errno::ECONNREFUSED, Errno::ETIMEDOUT, Errno::ENETUNREACH,