diff --git a/.env.example b/.env.example index 1cca08ad..9c5d13f5 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,2 @@ SECRET_KEY_BASE= +IMAP_SERVER= diff --git a/lib/warden/imap.rb b/lib/warden/imap.rb index e757ca1c..a17ce5ad 100644 --- a/lib/warden/imap.rb +++ b/lib/warden/imap.rb @@ -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,