chore: Use the name of the sender from the mail object
if the sender email is Sony Mathew <Sony@chatwoot.com> Contact should be built with Sony Mathew Fixes #2911
This commit is contained in:
@@ -82,6 +82,10 @@ class MailPresenter < SimpleDelegator
|
||||
@mail.from.map(&:downcase)
|
||||
end
|
||||
|
||||
def sender_name
|
||||
Mail::Address.new(@mail[:from].value).name
|
||||
end
|
||||
|
||||
def original_sender
|
||||
@mail['X-Original-Sender'].try(:value) || from.first
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user