Class: BounceFetcher::PopFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/bounce_fetcher/pop_fetcher.rb

Defined Under Namespace

Classes: Email

Instance Method Summary collapse

Constructor Details

#initialize(host, username, password, port = 110) ⇒ PopFetcher

Returns a new instance of PopFetcher.



30
31
32
33
34
35
# File 'lib/bounce_fetcher/pop_fetcher.rb', line 30

def initialize(host, username, password, port = 110)
  @host = host
  @username = username
  @password = password
  @port = port
end

Instance Method Details

#eachObject



37
38
39
40
41
42
# File 'lib/bounce_fetcher/pop_fetcher.rb', line 37

def each
  connection.each_mail do |e|
    yield Email.new(e)
  end
  connection.finish
end