diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-04 16:11:37 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-04 16:11:37 +0100 |
commit | 6fbd9fcae218b675b298d7b4101e2f184e56818c (patch) | |
tree | f04f0aa7266711c40b65ad60f29a106747c05202 /lib/mauve/pop3_server.rb | |
parent | b3a4345e1359f77011bd312b1afeed8eb2b97c91 (diff) |
Updated pop3 server to be configurable
Diffstat (limited to 'lib/mauve/pop3_server.rb')
-rw-r--r-- | lib/mauve/pop3_server.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/mauve/pop3_server.rb b/lib/mauve/pop3_server.rb index 36a6cd2..b8253b0 100644 --- a/lib/mauve/pop3_server.rb +++ b/lib/mauve/pop3_server.rb @@ -28,7 +28,9 @@ module Mauve # # Use ipaddr to sanitize our IP. # - @ip = IPAddr.new(i) + IPAddr.new(i) + + @ip = i end def logger @@ -273,7 +275,9 @@ module Mauve def messages if @messages.empty? @messages = [] - smtp = Mauve::Notifiers::Email::Default.new("TODO: why do I need to put this argument here?") + + email = Configuration.current.notification_methods['email'] + alerts_seen = [] # @@ -310,7 +314,7 @@ module Mauve alerts_seen << [a.alert_id, a.update_type] - @messages << [a, smtp.prepare_message(self.user, a.alert, [])] + @messages << [a, email.prepare_message(self.user, a.alert, [])] end end |