Fix: product#804: email sender improvement (#6579)

This commit is contained in:
Tejaswini Chile
2023-03-02 10:57:14 +05:30
committed by GitHub
parent f1827c82fd
commit 61d0a63bf7
3 changed files with 3 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ class ConversationReplyMailer < ApplicationMailer
def channel_email_with_name
if @conversation.assignee.present?
I18n.t('conversations.reply.channel_email.header.reply_with_name', assignee_name: assignee_name, from_email: @channel.email)
I18n.t('conversations.reply.channel_email.header.reply_with_name', assignee_name: assignee_name, inbox_name: @inbox.name)
else
I18n.t('conversations.reply.channel_email.header.reply_with_inbox_name', inbox_name: @inbox.name, from_email: @channel.email)
end

View File

@@ -149,7 +149,7 @@ en:
reply_with_name: '%{assignee_name} from %{inbox_name} <reply+%{reply_email}>'
channel_email:
header:
reply_with_name: '%{assignee_name} from <%{from_email}>'
reply_with_name: '%{assignee_name} from %{inbox_name}'
reply_with_inbox_name: '%{inbox_name} <%{from_email}>'
email_subject: "New messages on this conversation"
transcript_subject: "Conversation Transcript"

View File

@@ -171,7 +171,7 @@ RSpec.describe ConversationReplyMailer, type: :mailer do
it 'renders assignee name in the from address' do
mail = described_class.email_reply(message)
expect(mail['from'].value).to eq "#{conversation.assignee.available_name} from <#{smtp_email_channel.email}>"
expect(mail['from'].value).to eq "#{conversation.assignee.available_name} from #{smtp_email_channel.inbox.name}"
end
it 'renders inbox name in the from address' do