Module: Imap::Backup::Configuration::ConnectionTester

Defined in:
lib/imap/backup/configuration/connection_tester.rb

Class Method Summary collapse

Class Method Details

.test(account) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/imap/backup/configuration/connection_tester.rb', line 5

def self.test()
  ::Connection.new().imap
  "Connection successful"
rescue Net::IMAP::NoResponseError
  "No response"
rescue StandardError => e
  "Unexpected error: #{e}"
end