chore: log emails sent from chatwoot (#8721)

- Log details related to emails sent from Chatwoot to assist in debugging email delivery/bounces/complaints
This commit is contained in:
Vishnu Narayanan
2024-01-17 14:49:14 +05:30
committed by GitHub
parent 76fe2f9bb8
commit 88b8597e4d
3 changed files with 6 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ class ApplicationMailer < ActionMailer::Base
end
def send_mail_with_liquid(*args)
Rails.logger.info "Email sent to #{args[0][:to]} with subject #{args[0][:subject]}"
mail(*args) do |format|
# explored sending a multipart email containing both text type and html
# parsing the html with nokogiri will remove the links as well

View File

@@ -45,6 +45,9 @@ class ConversationReplyMailer < ApplicationMailer
@messages = @conversation.messages.chat.select(&:conversation_transcriptable?)
Rails.logger.info("Email sent from #{from_email_with_name} \
to #{to_email} with subject #{@conversation.display_id} \
#{I18n.t('conversations.reply.transcript_subject')} ")
mail({
to: to_email,
from: from_email_with_name,

View File

@@ -16,6 +16,8 @@ module ConversationReplyMailerHelper
ms_smtp_settings
set_delivery_method
Rails.logger.info("Email sent from #{email_from} to #{to_emails} with subject #{mail_subject}")
mail(@options)
end