Fix: parse verification mail (#3864)
Email parsing logic was stripping of HTML tables which was causing the issue in this case. Fixes: #3731
This commit is contained in:
@@ -5,7 +5,7 @@ module MailboxHelper
|
||||
@message = @conversation.messages.create(
|
||||
account_id: @conversation.account_id,
|
||||
sender: @conversation.contact,
|
||||
content: processed_mail.text_content[:reply],
|
||||
content: mail_content,
|
||||
inbox_id: @conversation.inbox_id,
|
||||
message_type: 'incoming',
|
||||
content_type: 'incoming_email',
|
||||
@@ -48,4 +48,12 @@ module MailboxHelper
|
||||
# notification emails are send via mailer sender email address. so it should match
|
||||
@processed_mail.original_sender == Mail::Address.new(ENV.fetch('MAILER_SENDER_EMAIL', 'Chatwoot <accounts@chatwoot.com>')).address
|
||||
end
|
||||
|
||||
def mail_content
|
||||
if processed_mail.text_content.present?
|
||||
processed_mail.text_content[:reply]
|
||||
elsif processed_mail.html_content.present?
|
||||
processed_mail.html_content[:reply]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user