fix: Add correct thread message_id to the email message (#1659)

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2021-01-17 22:43:32 +05:30
committed by GitHub
parent 14eefe3824
commit d758df8807
6 changed files with 47 additions and 13 deletions

View File

@@ -37,7 +37,7 @@ class Channel::Email < ApplicationRecord
private
def ensure_forward_to_address
# TODO : implement better logic here
self.forward_to_address ||= "#{SecureRandom.hex}@xyc.com"
email_domain = InstallationConfig.find_by(name: 'MAILER_INBOUND_EMAIL_DOMAIN')&.value
self.forward_to_address ||= "#{SecureRandom.hex}@#{email_domain}"
end
end