aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mail_handler
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mail_handler')
-rw-r--r--lib/mail_handler/backends/mail_backend.rb4
-rw-r--r--lib/mail_handler/mail_handler.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/mail_handler/backends/mail_backend.rb b/lib/mail_handler/backends/mail_backend.rb
index 89fc24bb9..5a7e0ef65 100644
--- a/lib/mail_handler/backends/mail_backend.rb
+++ b/lib/mail_handler/backends/mail_backend.rb
@@ -36,7 +36,7 @@ module MailHandler
module Backends
module MailBackend
- def backend()
+ def backend
'Mail'
end
@@ -124,7 +124,7 @@ module MailHandler
envelope_to = mail['envelope-to'] ? [mail['envelope-to'].value.to_s] : []
((mail.to || []) +
(mail.cc || []) +
- (envelope_to || [])).uniq
+ (envelope_to || [])).compact.uniq
end
def empty_return_path?(mail)
diff --git a/lib/mail_handler/mail_handler.rb b/lib/mail_handler/mail_handler.rb
index 0c60fd3f5..313869d16 100644
--- a/lib/mail_handler/mail_handler.rb
+++ b/lib/mail_handler/mail_handler.rb
@@ -134,7 +134,7 @@ module MailHandler
begin
zip_file = Zip::ZipFile.open(tempfile.path)
text += get_attachment_text_from_zip_file(zip_file)
- zip_file.close()
+ zip_file.close
rescue
$stderr.puts("Error processing zip file: #{$!.inspect}")
end