Skip to content

Commit

Permalink
Merge pull request #21455 from jaapjansma/issue_645
Browse files Browse the repository at this point in the history
Fixed issue with sending from do-not-reply@domain address
  • Loading branch information
demeritcowboy authored Sep 29, 2021
2 parents f37e22a + a5c0302 commit 64b64da
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CRM/Mailing/Event/BAO/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static function confirm($contact_id, $subscribe_id, $hash) {
$config = CRM_Core_Config::singleton();

$domain = CRM_Core_BAO_Domain::getDomain();
list($domainEmailName, $_) = CRM_Core_BAO_Domain::getNameAndEmail();
list($domainEmailName, $domainEmailAddress) = CRM_Core_BAO_Domain::getNameAndEmail();

list($display_name, $email) = CRM_Contact_BAO_Contact_Location::getEmailDetails($se->contact_id);

Expand Down Expand Up @@ -125,7 +125,7 @@ public static function confirm($contact_id, $subscribe_id, $hash) {
$mailParams = [
'groupName' => 'Mailing Event ' . $component->component_type,
'subject' => $component->subject,
'from' => "\"$domainEmailName\" <" . CRM_Core_BAO_Domain::getNoReplyEmailAddress() . '>',
'from' => "\"{$domainEmailName}\" <{$domainEmailAddress}>",
'toEmail' => $email,
'toName' => $display_name,
'replyTo' => CRM_Core_BAO_Domain::getNoReplyEmailAddress(),
Expand Down
4 changes: 2 additions & 2 deletions CRM/Mailing/Event/BAO/Reply.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,12 @@ private static function autoRespond(&$mailing, $queue_id, $replyto) {
$component->find(TRUE);

$domain = CRM_Core_BAO_Domain::getDomain();
list($domainEmailName, $_) = CRM_Core_BAO_Domain::getNameAndEmail();
list($domainEmailName, $domainEmailAddress) = CRM_Core_BAO_Domain::getNameAndEmail();

$params = [
'subject' => $component->subject,
'toEmail' => $to,
'from' => "\"$domainEmailName\" <" . CRM_Core_BAO_Domain::getNoReplyEmailAddress() . '>',
'from' => "\"{$domainEmailName}\" <{$domainEmailAddress}>",
'replyTo' => CRM_Core_BAO_Domain::getNoReplyEmailAddress(),
'returnPath' => CRM_Core_BAO_Domain::getNoReplyEmailAddress(),
];
Expand Down
2 changes: 1 addition & 1 deletion CRM/Mailing/Event/BAO/Resubscribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public static function send_resub_response($queue_id, $groups, $is_domain = FALS

$params = [
'subject' => $component->subject,
'from' => "\"$domainEmailName\" <" . CRM_Core_BAO_Domain::getNoReplyEmailAddress() . '>',
'from' => "\"{$domainEmailName}\" <{$domainEmailAddress}>",
'toEmail' => $eq->email,
'replyTo' => CRM_Core_BAO_Domain::getNoReplyEmailAddress(),
'returnPath' => CRM_Core_BAO_Domain::getNoReplyEmailAddress(),
Expand Down
2 changes: 1 addition & 1 deletion CRM/Mailing/Event/BAO/Unsubscribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public static function send_unsub_response($queue_id, $groups, $is_domain, $job)

$params = [
'subject' => $component->subject,
'from' => "\"$domainEmailName\" <" . CRM_Core_BAO_Domain::getNoReplyEmailAddress() . '>',
'from' => "\"{$domainEmailName}\" <{$domainEmailAddress}>",
'toEmail' => $eq->email,
'replyTo' => CRM_Core_BAO_Domain::getNoReplyEmailAddress(),
'returnPath' => CRM_Core_BAO_Domain::getNoReplyEmailAddress(),
Expand Down

0 comments on commit 64b64da

Please sign in to comment.