-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Towards CRM-17753 - consolidate code location for do-not-reply@mydomain.com #12270
Conversation
(Standard links)
|
8035b8a
to
541a0a5
Compare
@@ -143,11 +143,11 @@ public static function confirm($contact_id, $subscribe_id, $hash) { | |||
$mailParams = array( | |||
'groupName' => 'Mailing Event ' . $component->component_type, | |||
'subject' => $component->subject, | |||
'from' => "\"$domainEmailName\" <do-not-reply@$emailDomain>", | |||
'from' => "\"$domainEmailName\" <" . CRM_Core_BAO_Domain::getNoReplyEmailAddress() . '>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton you need to remove
$emailDomain = CRM_Core_BAO_MailSettings::defaultDomain();
above at line 121
@@ -189,7 +189,7 @@ public static function send($queue_id, &$mailing, &$bodyTxt, $replyto, &$bodyHTM | |||
'To' => $mailing->replyto_email, | |||
'From' => $from, | |||
'Reply-To' => empty($replyto) ? $eq->email : $replyto, | |||
'Return-Path' => "do-not-reply@{$emailDomain}", | |||
'Return-Path' => CRM_Core_BAO_Domain::getNoReplyEmailAddress(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton you need to remove
$emailDomain = CRM_Core_BAO_MailSettings::defaultDomain();
above at line 176
@@ -227,7 +227,7 @@ public function send_confirm_request($email) { | |||
'From' => "\"{$domainEmailName}\" <{$domainEmailAddress}>", | |||
'To' => $email, | |||
'Reply-To' => $confirm, | |||
'Return-Path' => "do-not-reply@$emailDomain", | |||
'Return-Path' => CRM_Core_BAO_Domain::getNoReplyEmailAddress(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton you need to remove
$emailDomain = CRM_Core_BAO_MailSettings::defaultDomain();
above at line 203
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the others - but this one is still used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok
541a0a5
to
3e8ace2
Compare
3e8ace2
to
576fcb9
Compare
@monishdeb is this mergeable now? |
Overview
#10648 and #10647 both seek to prevent the mailing out of emails with from being do-not-reply@mydomain.com which is bad practice. They are stalled on agreement on what the correct alternative is and on the need to consolidate the code to be able to make the change sensibly. This does the latter - ie. consolidates the code for a change but does not make one.
Before
do not reply address constructed in multiple places
After
do not reply constructed in only one (it would be possible to go further & also return the longer variant with the <> part but that can follow as a wrapper function later.
Technical Details
In terms of the bigger picture I would suggest that we use the civicrm_mail_settings table & store another type - although there might be a case for option value or setting
Comments