Chore: Change the prefix in reply emails (#1060)
* Chore: Change the prefix in reply emails In conversation continuity the reply to email was looking like reply+to+{some_random_hex_id}@reply.chatwoot.com Changed the prefix to just `reply` instead of `reply+to`. * Chore: Change reply email prefix in outbound emails Changed the prefix from `reply+to+` to just `reply+` in the reply emails in the converstaion related outbound emails.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class ApplicationMailbox < ActionMailbox::Base
|
||||
# Last part is the regex for the UUID
|
||||
# Eg: email should be something like : reply+to+6bdc3f4d-0bec-4515-a284-5d916fdde489@domain.com
|
||||
REPLY_EMAIL_USERNAME_PATTERN = /^reply\+to\+([0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12})$/i.freeze
|
||||
# Eg: email should be something like : reply+6bdc3f4d-0bec-4515-a284-5d916fdde489@domain.com
|
||||
REPLY_EMAIL_USERNAME_PATTERN = /^reply\+([0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12})$/i.freeze
|
||||
|
||||
def self.reply_match_proc
|
||||
proc do |inbound_mail_obj|
|
||||
|
||||
@@ -2,8 +2,8 @@ class ConversationMailbox < ApplicationMailbox
|
||||
attr_accessor :conversation_uuid, :processed_mail
|
||||
|
||||
# Last part is the regex for the UUID
|
||||
# Eg: email should be something like : reply+to+6bdc3f4d-0bec-4515-a284-5d916fdde489@domain.com
|
||||
EMAIL_PART_PATTERN = /^reply\+to\+([0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12})$/i.freeze
|
||||
# Eg: email should be something like : reply+6bdc3f4d-0bec-4515-a284-5d916fdde489@domain.com
|
||||
EMAIL_PART_PATTERN = /^reply\+([0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12})$/i.freeze
|
||||
|
||||
before_processing :conversation_uuid_from_to_address,
|
||||
:verify_decoded_params,
|
||||
|
||||
@@ -55,7 +55,7 @@ class ConversationReplyMailer < ApplicationMailer
|
||||
|
||||
def reply_email
|
||||
if custom_domain_email_enabled?
|
||||
"reply+to+#{@conversation.uuid}@#{@account.domain}"
|
||||
"reply+#{@conversation.uuid}@#{@account.domain}"
|
||||
else
|
||||
@agent&.email
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user