Fix: fixing mail to and in_reply_to issues (#3451)
This commit is contained in:
@@ -90,6 +90,20 @@ class MailPresenter < SimpleDelegator
|
||||
@mail['X-Original-Sender'].try(:value) || from.first
|
||||
end
|
||||
|
||||
def email_forwarded_for
|
||||
@mail['X-Forwarded-For'].try(:value)
|
||||
end
|
||||
|
||||
def mail_receiver
|
||||
if @mail.to.blank?
|
||||
return [email_forwarded_for] if email_forwarded_for.present?
|
||||
|
||||
[]
|
||||
else
|
||||
@mail.to
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# forcing the encoding of the content to UTF-8 so as to be compatible with database and serializers
|
||||
|
||||
Reference in New Issue
Block a user