Skip to content

Commit

Permalink
Merge pull request #155 from martinduparc/patch-1
Browse files Browse the repository at this point in the history
Send individual emails instead of using BCC
  • Loading branch information
Joshua Carter authored Jan 20, 2020
2 parents 569515c + 72164d1 commit 06433a9
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/Pages/MemberProfilePageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,22 +599,23 @@ protected function addMember($form)
);

$mail->setSubject("Registration Approval Requested for $config->Title");
$mail->setHTMLTemplate('Symbiote\\MemberProfiles\\Email\\MemberRequiresApprovalEmail');
$mail->setData(array(
'SiteConfig' => $config,
'Member' => $member,
'ApproveLink' => Director::absoluteURL($approve)
));

foreach ($emails as $email) {
if (!Email::is_valid_address($email)) {
// Ignore invalid email addresses or else we'll get validation errors.
// ie. default 'admin' account
continue;
}
$mail->addBCC($email);

$mail->setTo($email);
$mail->send();
}
$mail->setHTMLTemplate('Symbiote\\MemberProfiles\\Email\\MemberRequiresApprovalEmail');
$mail->setData(array(
'SiteConfig' => $config,
'Member' => $member,
'ApproveLink' => Director::absoluteURL($approve)
));

$mail->send();
}
} else {
// NOTE(Jake): 2018-05-03
Expand Down

0 comments on commit 06433a9

Please sign in to comment.