fix: Fetch email address to create contact (#4952)
Get the email address from the email content in the correct format. Fixes: chatwoot/product#454
This commit is contained in:
@@ -114,7 +114,11 @@ class MailPresenter < SimpleDelegator
|
||||
end
|
||||
|
||||
def original_sender
|
||||
@mail[:reply_to].try(:value) || @mail['X-Original-Sender'].try(:value) || from.first
|
||||
from_email_address(@mail[:reply_to].try(:value)) || @mail['X-Original-Sender'].try(:value) || from_email_address(from.first)
|
||||
end
|
||||
|
||||
def from_email_address(email)
|
||||
Mail::Address.new(email).address
|
||||
end
|
||||
|
||||
def email_forwarded_for
|
||||
|
||||
Reference in New Issue
Block a user