Fix: fixing mail to and in_reply_to issues (#3451)

This commit is contained in:
Tejaswini Chile
2021-12-10 19:42:26 +05:30
committed by GitHub
parent dcdeaa7954
commit c2519ea1ea
7 changed files with 1331 additions and 6 deletions

View File

@@ -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