lib/fat_free_crm/mail_processor/base.rb
def connect!(options = {})
        log "connecting & logging in to #{@settings[:server]}..."
        @imap = Net::IMAP.new(@settings[:server], @settings[:port], @settings[:ssl])
        @imap.login(@settings[:user], @settings[:password])
        log "logged in to #{@settings[:server]}, checking folders..."
        @imap.select(@settings[:scan_folder]) unless options[:setup]
        @imap
      rescue Exception => e
        warn "Could not login to the IMAP server: #{e.inspect}" unless Rails.env == "test"
        nil
      end
# Connects to the imap server with the loaded settings
#------------------------------------------------------------------------------
Connects to the imap server with the loaded settings
Connects to the imap server with the loaded settings
def connect!(options = {})
        log "connecting & logging in to #{@settings[:server]}..."
        @imap = Net::IMAP.new(@settings[:server], @settings[:port], @settings[:ssl])
        @imap.login(@settings[:user], @settings[:password])
        log "logged in to #{@settings[:server]}, checking folders..."
        @imap.select(@settings[:scan_folder]) unless options[:setup]
        @imap
      rescue Exception => e
        warn "Could not login to the IMAP server: #{e.inspect}" unless Rails.env == "test"
        nil
      end
def connect! ( options = { } ) log "connecting & logging in to #{@settings[:server]}..." @imap = Net :: IMAP . new ( @settings [ :server ] , @settings [ :port ] , @settings [ :ssl ] ) @imap . login ( @settings [ :user ] , @settings [ :password ] ) log "logged in to #{@settings[:server]}, checking folders..." @imap . select ( @settings [ :scan_folder ] ) unless options [ :setup ] @imap rescue Exception => e warn "Could not login to the IMAP server: #{e.inspect}" unless Rails . env == "test" nil end
Connects to the imap server with the loaded settings
Connects to the imap server with the loaded settings
options