diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/incoming_message.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 60828e179..cfa0d59da 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -85,6 +85,10 @@ class IncomingMessage < ActiveRecord::Base @mail end + def from_address + self.mail.from_addrs[0].address + 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 |