From 04d347f0eea7bdc436721d529a95481bf45643b2 Mon Sep 17 00:00:00 2001 From: Sony Mathew Date: Fri, 24 Jan 2020 14:10:52 +0545 Subject: [PATCH] Chore: Changed from email and reply to email for conversation email (#444) --- app/mailers/conversation_mailer.rb | 2 +- spec/mailers/conversation_mailer_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/mailers/conversation_mailer.rb b/app/mailers/conversation_mailer.rb index 557625f2c..44f15f8b1 100644 --- a/app/mailers/conversation_mailer.rb +++ b/app/mailers/conversation_mailer.rb @@ -15,7 +15,7 @@ class ConversationMailer < ApplicationMailer @messages = recap_messages + new_messages @messages = @messages.select(&:reportable?) - mail(to: @contact&.email, from: @agent&.email, subject: mail_subject(@messages.last)) + mail(to: @contact&.email, reply_to: @agent&.email, subject: mail_subject(@messages.last)) end private diff --git a/spec/mailers/conversation_mailer_spec.rb b/spec/mailers/conversation_mailer_spec.rb index 759db30db..d0dd16b95 100644 --- a/spec/mailers/conversation_mailer_spec.rb +++ b/spec/mailers/conversation_mailer_spec.rb @@ -23,8 +23,8 @@ RSpec.describe ConversationMailer, type: :mailer do expect(mail.to).to eq([message&.conversation&.contact&.email]) end - it 'renders the sender email' do - expect(mail.from).to eq([message&.conversation&.assignee&.email]) + it 'renders the reply to email' do + expect(mail.reply_to).to eq([message&.conversation&.assignee&.email]) end end end