Class: MList::EmailServer::Pop

Inherits:
Base
  • Object
show all
Defined in:
lib/mlist/email_server/pop.rb

Instance Attribute Summary

Attributes inherited from Base

#settings

Instance Method Summary collapse

Methods inherited from Base

#generate_message_id, #initialize, #receive, #receiver

Constructor Details

This class inherits a constructor from MList::EmailServer::Base

Instance Method Details

#deliver(tmail) ⇒ Object



7
8
9
# File 'lib/mlist/email_server/pop.rb', line 7

def deliver(tmail)
  raise "Mail cannot be delivered through a POP server. Please use the '#{MList::EmailServer::Default.name}' type."
end

#executeObject



11
12
13
14
15
# File 'lib/mlist/email_server/pop.rb', line 11

def execute
   do |pop|
    pop.mails.each { |message| receive(TMail::Mail.parse(message.pop)); message.delete }
  end
end