Approven von Beitragserstattungen
This commit is contained in:
@@ -119,13 +119,16 @@ class ReleaseRefundCommand
|
||||
*/
|
||||
private function notify(ParticipantRefund $refund): void
|
||||
{
|
||||
Mail::to($this->participant->email_1)->send(new RefundReleasedMail(
|
||||
participant: $this->participant,
|
||||
refund: $refund,
|
||||
));
|
||||
$recipients = [$this->participant->email_1];
|
||||
|
||||
if ($this->participant->email_2 !== null) {
|
||||
Mail::to($this->participant->email_2)->send(new RefundReleasedMail(
|
||||
// `filled()` und nicht `!== null`: Der Anmeldewizard überspringt den Schritt "Kontaktperson" bei
|
||||
// Volljährigen und legt das Feld als Leerstring an -- `Mail::to('')` liefe ins Leere.
|
||||
if (filled($this->participant->email_2)) {
|
||||
$recipients[] = $this->participant->email_2;
|
||||
}
|
||||
|
||||
foreach ($recipients as $recipient) {
|
||||
Mail::to($recipient)->send(new RefundReleasedMail(
|
||||
participant: $this->participant,
|
||||
refund: $refund,
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user