Sha256: abbb3ad00d06bd028bd6b48952d3cbc1267de72ffa72021f9dc36a70e1e06d92
Contents?: true
Size: 738 Bytes
Versions: 20
Compression:
Stored size: 738 Bytes
Contents
require 'pop_ssl' module MList module EmailServer class Pop < Base def deliver(tmail) raise "Mail cannot be delivered through a POP server. Please use the '#{MList::EmailServer::Default.name}' type." end def execute connect_to_email_account do |pop| pop.mails.each { |message| receive(TMail::Mail.parse(message.pop)); message.delete } end end private def connect_to_email_account pop3 = Net::POP3.new(settings[:server], settings[:port], false) pop3.enable_ssl if settings[:ssl] pop3.start(settings[:username], settings[:password]) do |pop| yield pop end end end end end
Version data entries
20 entries across 20 versions & 2 rubygems