Fix: Outgoing email sender header translation issue (#3393)

Outgoing email-sender header translation fix for "from"

Fixes #3380
This commit is contained in:
Akhil G Krishnan 2021-11-27 09:46:12 +05:30 committed by GitHub
parent a4ee8ee239
commit 6a98a812e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -98,7 +98,8 @@ class ConversationReplyMailer < ApplicationMailer
def reply_email
if should_use_conversation_email_address?
"#{assignee_name} from #{@inbox.name} <reply+#{@conversation.uuid}@#{@account.inbound_email_domain}>"
I18n.t('conversations.reply.email.header.reply_with_name', assignee_name: assignee_name, inbox_name: @inbox.name,
reply_email: "#{@conversation.uuid}@#{@account.inbound_email_domain}")
else
@inbox.email_address || @agent&.email
end
@ -106,9 +107,11 @@ class ConversationReplyMailer < ApplicationMailer
def from_email_with_name
if should_use_conversation_email_address?
"#{assignee_name} from #{@inbox.name} <#{parse_email(@account.support_email)}>"
I18n.t('conversations.reply.email.header.from_with_name', assignee_name: assignee_name, inbox_name: @inbox.name,
from_email: parse_email(@account.support_email))
else
"#{assignee_name} from #{@inbox.name} <#{parse_email(inbox_from_email_address)}>"
I18n.t('conversations.reply.email.header.from_with_name', assignee_name: assignee_name, inbox_name: @inbox.name,
from_email: parse_email(inbox_from_email_address))
end
end

View file

@ -93,6 +93,10 @@ en:
email_input_box_message_body: "Get notified by email"
csat_input_message_body: "Please rate the conversation"
reply:
email:
header:
from_with_name: '%{assignee_name} from %{inbox_name} <%{from_email}>'
reply_with_name: '%{assignee_name} from %{inbox_name} <reply+%{reply_email}>'
email_subject: "New messages on this conversation"
transcript_subject: "Conversation Transcript"
survey: