aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/incoming_message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/incoming_message.rb')
-rw-r--r--app/models/incoming_message.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 21c15607e..43809074a 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -97,6 +97,12 @@ class IncomingMessage < ActiveRecord::Base
self.mail.from_addrs[0].spec
end
+ def addresses
+ ((self.mail.to || []) +
+ (self.mail.cc || []) +
+ (self.mail.envelope_to || [])).uniq
+ end
+
# Returns the name of the person the incoming message is from, or nil if
# there isn't one or if there is only an email address. XXX can probably
# remove from_name_if_present (which is a monkey patch) by just calling