From 5da0b0667f1af77b06a84f522ba501b3ea96faa6 Mon Sep 17 00:00:00 2001 From: Sagar Date: Fri, 25 Mar 2022 11:35:26 +0100 Subject: [PATCH] Fix: SMTP IMAP configuration from email This fix should allow emails from the "Email" inbox to show from as "Name ". if SMTP within Inbox is disabled. --- app/mailers/conversation_reply_mailer_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/mailers/conversation_reply_mailer_helper.rb b/app/mailers/conversation_reply_mailer_helper.rb index a8e5695f4..f95150232 100644 --- a/app/mailers/conversation_reply_mailer_helper.rb +++ b/app/mailers/conversation_reply_mailer_helper.rb @@ -40,6 +40,10 @@ module ConversationReplyMailerHelper end def email_smtp_enabled + @inbox.inbox_type == 'Email' && @channel.smtp_enabled + end + + def email_imap_enabled @inbox.inbox_type == 'Email' && @channel.imap_enabled end @@ -48,6 +52,6 @@ module ConversationReplyMailerHelper end def email_reply_to - email_smtp_enabled ? @channel.smtp_email : reply_email + email_imap_enabled ? @channel.imap_email : reply_email end end