Add sender_name in the SMTP reply mails (#6528)

This commit is contained in:
Tejaswini Chile
2023-02-24 13:20:56 +05:30
committed by GitHub
parent 9fcb29484d
commit 26e760a281
4 changed files with 24 additions and 2 deletions

View File

@@ -35,7 +35,6 @@ class ConversationReplyMailer < ApplicationMailer
init_conversation_attributes(message.conversation)
@message = message
reply_mail_object = prepare_mail(true)
message.update(source_id: reply_mail_object.message_id)
end
@@ -115,6 +114,14 @@ class ConversationReplyMailer < ApplicationMailer
end
end
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)
else
I18n.t('conversations.reply.channel_email.header.reply_with_inbox_name', inbox_name: @inbox.name, from_email: @channel.email)
end
end
def parse_email(email_string)
Mail::Address.new(email_string).address
end

View File

@@ -72,7 +72,7 @@ module ConversationReplyMailerHelper
end
def email_from
email_microsoft_auth_enabled || email_smtp_enabled ? @channel.email : from_email_with_name
email_microsoft_auth_enabled || email_smtp_enabled ? channel_email_with_name : from_email_with_name
end
def email_reply_to