From 6a98a812e70cd76ad4ee1e9ca33af98ec4b7b3e9 Mon Sep 17 00:00:00 2001 From: Akhil G Krishnan Date: Sat, 27 Nov 2021 09:46:12 +0530 Subject: [PATCH] Fix: Outgoing email sender header translation issue (#3393) Outgoing email-sender header translation fix for "from" Fixes #3380 --- app/mailers/conversation_reply_mailer.rb | 9 ++++++--- config/locales/en.yml | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/mailers/conversation_reply_mailer.rb b/app/mailers/conversation_reply_mailer.rb index 333eb01fe..2e6e4bf67 100644 --- a/app/mailers/conversation_reply_mailer.rb +++ b/app/mailers/conversation_reply_mailer.rb @@ -98,7 +98,8 @@ class ConversationReplyMailer < ApplicationMailer def reply_email if should_use_conversation_email_address? - "#{assignee_name} from #{@inbox.name} " + 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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 12cb8ce0f..0804fbcd9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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} ' email_subject: "New messages on this conversation" transcript_subject: "Conversation Transcript" survey: