do not use same reply to as to
This commit is contained in:
@@ -138,9 +138,11 @@ class SubmitterMailer < ApplicationMailer
|
|||||||
private
|
private
|
||||||
|
|
||||||
def build_submitter_reply_to(submitter)
|
def build_submitter_reply_to(submitter)
|
||||||
reply_to =
|
reply_to = submitter.preferences['reply_to'].presence
|
||||||
submitter.preferences['reply_to'].presence ||
|
|
||||||
(submitter.submission.created_by_user || submitter.template.author)&.friendly_name&.sub(/\+\w+@/, '@')
|
if reply_to.blank? && (submitter.submission.created_by_user || submitter.template.author)&.email != submitter.email
|
||||||
|
reply_to = (submitter.submission.created_by_user || submitter.template.author)&.friendly_name&.sub(/\+\w+@/, '@')
|
||||||
|
end
|
||||||
|
|
||||||
return nil if reply_to.to_s.match?(NO_REPLY_REGEXP)
|
return nil if reply_to.to_s.match?(NO_REPLY_REGEXP)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user