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:
@@ -30,6 +30,7 @@ class ApplicationMailer < ActionMailer::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def send_mail_with_liquid(*args)
|
def send_mail_with_liquid(*args)
|
||||||
|
Rails.logger.info "Email sent to #{args[0][:to]} with subject #{args[0][:subject]}"
|
||||||
mail(*args) do |format|
|
mail(*args) do |format|
|
||||||
# explored sending a multipart email containing both text type and html
|
# explored sending a multipart email containing both text type and html
|
||||||
# parsing the html with nokogiri will remove the links as well
|
# parsing the html with nokogiri will remove the links as well
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ class ConversationReplyMailer < ApplicationMailer
|
|||||||
|
|
||||||
@messages = @conversation.messages.chat.select(&:conversation_transcriptable?)
|
@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({
|
mail({
|
||||||
to: to_email,
|
to: to_email,
|
||||||
from: from_email_with_name,
|
from: from_email_with_name,
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ module ConversationReplyMailerHelper
|
|||||||
ms_smtp_settings
|
ms_smtp_settings
|
||||||
set_delivery_method
|
set_delivery_method
|
||||||
|
|
||||||
|
Rails.logger.info("Email sent from #{email_from} to #{to_emails} with subject #{mail_subject}")
|
||||||
|
|
||||||
mail(@options)
|
mail(@options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user