Sha256: b5c7e812d5ca321ec499a5449c45b4c55355854a8aab9d76c55b5c5395b682cc

Contents?: true

Size: 776 Bytes

Versions: 19

Compression:

Stored size: 776 Bytes

Contents

module MList
  module EmailServer
    
    class Default < Base
      def initialize(incoming_server, outgoing_server, settings = {})
        super(settings)
        @incoming_server, @outgoing_server = incoming_server, outgoing_server
        @incoming_server.receiver(self)
      end
      
      # Delegates delivery of email to outgoing server.
      #
      def deliver(tmail)
        @outgoing_server.deliver(tmail)
      end
      
      # Delegates fetching emails to incoming server.
      def execute
        @incoming_server.execute
      end
      
      # Delegates processing of email from incoming server to receivers on
      # self.
      #
      def receive_email(email)
        @receivers.each { |r| r.receive_email(email) }
      end
    end
    
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
aiwilliams-mlist-0.1.4 lib/mlist/email_server/default.rb
aiwilliams-mlist-0.1.5 lib/mlist/email_server/default.rb
aiwilliams-mlist-0.1.6 lib/mlist/email_server/default.rb
aiwilliams-mlist-0.1.7 lib/mlist/email_server/default.rb
aiwilliams-mlist-0.1.8 lib/mlist/email_server/default.rb
mlist-0.1.23 lib/mlist/email_server/default.rb
mlist-0.1.22 lib/mlist/email_server/default.rb
mlist-0.1.21 lib/mlist/email_server/default.rb
mlist-0.1.20 lib/mlist/email_server/default.rb
mlist-0.1.19 lib/mlist/email_server/default.rb
mlist-0.1.18 lib/mlist/email_server/default.rb
mlist-0.1.17 lib/mlist/email_server/default.rb
mlist-0.1.16 lib/mlist/email_server/default.rb
mlist-0.1.14 lib/mlist/email_server/default.rb
mlist-0.1.13 lib/mlist/email_server/default.rb
mlist-0.1.12 lib/mlist/email_server/default.rb
mlist-0.1.11 lib/mlist/email_server/default.rb
mlist-0.1.10 lib/mlist/email_server/default.rb
mlist-0.1.9 lib/mlist/email_server/default.rb