|
@@ -316,6 +316,7 @@ final class Mailer
|
|
|
$h .= '</ul>';
|
|
$h .= '</ul>';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $h .= $this->renderFooterHtml();
|
|
|
$h .= '</body></html>';
|
|
$h .= '</body></html>';
|
|
|
return $h;
|
|
return $h;
|
|
|
}
|
|
}
|
|
@@ -354,6 +355,7 @@ final class Mailer
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $t .= $this->renderFooterText();
|
|
|
return $t;
|
|
return $t;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -399,6 +401,7 @@ final class Mailer
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$h .= '<p style="color:#888;font-size:0.9em">Bei Rückfragen kontaktieren Sie bitte den Verein.</p>';
|
|
$h .= '<p style="color:#888;font-size:0.9em">Bei Rückfragen kontaktieren Sie bitte den Verein.</p>';
|
|
|
|
|
+ $h .= $this->renderFooterHtml();
|
|
|
$h .= '</body></html>';
|
|
$h .= '</body></html>';
|
|
|
return $h;
|
|
return $h;
|
|
|
}
|
|
}
|
|
@@ -435,6 +438,7 @@ final class Mailer
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$t .= "Bei Rückfragen kontaktieren Sie bitte den Verein.\n";
|
|
$t .= "Bei Rückfragen kontaktieren Sie bitte den Verein.\n";
|
|
|
|
|
+ $t .= $this->renderFooterText();
|
|
|
return $t;
|
|
return $t;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -455,6 +459,52 @@ final class Mailer
|
|
|
return htmlspecialchars($value, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
|
return htmlspecialchars($value, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Footer appended to every outgoing mail: organisation name and imprint link.
|
|
|
|
|
+ */
|
|
|
|
|
+ private function renderFooterHtml(): string
|
|
|
|
|
+ {
|
|
|
|
|
+ $orgName = trim((string) ($this->appConfig['project_name'] ?? ''));
|
|
|
|
|
+ $impressumUrl = trim((string) ($this->appConfig['impressum_url'] ?? ''));
|
|
|
|
|
+
|
|
|
|
|
+ $lines = [];
|
|
|
|
|
+ if ($orgName !== '') {
|
|
|
|
|
+ $lines[] = '<strong>' . $this->esc($orgName) . '</strong>';
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($impressumUrl !== '') {
|
|
|
|
|
+ $lines[] = 'Impressum: <a href="' . $this->esc($impressumUrl) . '" style="color:#888">'
|
|
|
|
|
+ . $this->esc($impressumUrl) . '</a>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if ($lines === []) {
|
|
|
|
|
+ return '';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return '<hr style="border:none;border-top:1px solid #ddd;margin:24px 0 8px">'
|
|
|
|
|
+ . '<p style="color:#888;font-size:0.8em;line-height:1.5;margin:0">'
|
|
|
|
|
+ . implode('<br>', $lines) . '</p>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private function renderFooterText(): string
|
|
|
|
|
+ {
|
|
|
|
|
+ $orgName = trim((string) ($this->appConfig['project_name'] ?? ''));
|
|
|
|
|
+ $impressumUrl = trim((string) ($this->appConfig['impressum_url'] ?? ''));
|
|
|
|
|
+
|
|
|
|
|
+ $lines = [];
|
|
|
|
|
+ if ($orgName !== '') {
|
|
|
|
|
+ $lines[] = $orgName;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($impressumUrl !== '') {
|
|
|
|
|
+ $lines[] = 'Impressum: ' . $impressumUrl;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if ($lines === []) {
|
|
|
|
|
+ return '';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return "\n" . str_repeat('-', 40) . "\n" . implode("\n", $lines) . "\n";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private function renderMinorAdminNoticeHtml(): string
|
|
private function renderMinorAdminNoticeHtml(): string
|
|
|
{
|
|
{
|
|
|
return '<div style="background:#fff3cd;border:1px solid #f0c36d;padding:10px 12px;margin:12px 0">'
|
|
return '<div style="background:#fff3cd;border:1px solid #f0c36d;padding:10px 12px;margin:12px 0">'
|
|
@@ -492,6 +542,7 @@ final class Mailer
|
|
|
$h .= $this->signedFormReceivedRowHtml('Bestätigt durch', $confirmedBy);
|
|
$h .= $this->signedFormReceivedRowHtml('Bestätigt durch', $confirmedBy);
|
|
|
}
|
|
}
|
|
|
$h .= '</table>';
|
|
$h .= '</table>';
|
|
|
|
|
+ $h .= $this->renderFooterHtml();
|
|
|
$h .= '</body></html>';
|
|
$h .= '</body></html>';
|
|
|
|
|
|
|
|
return $h;
|
|
return $h;
|
|
@@ -516,6 +567,7 @@ final class Mailer
|
|
|
$t .= 'Bestätigt durch: ' . $confirmedBy . "\n";
|
|
$t .= 'Bestätigt durch: ' . $confirmedBy . "\n";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $t .= $this->renderFooterText();
|
|
|
return $t;
|
|
return $t;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -738,7 +790,8 @@ final class Mailer
|
|
|
$template = "Ihr Sicherheitscode lautet: {{code}}\nDer Code ist {{ttl_minutes}} Minuten gültig.";
|
|
$template = "Ihr Sicherheitscode lautet: {{code}}\nDer Code ist {{ttl_minutes}} Minuten gültig.";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return $this->replaceOtpTemplateVars($template, $code, $ttlSeconds, false);
|
|
|
|
|
|
|
+ return $this->replaceOtpTemplateVars($template, $code, $ttlSeconds, false)
|
|
|
|
|
+ . $this->renderFooterText();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private function renderOtpHtml(string $code, int $ttlSeconds): string
|
|
private function renderOtpHtml(string $code, int $ttlSeconds): string
|
|
@@ -749,7 +802,8 @@ final class Mailer
|
|
|
$template = '<p>Ihr Sicherheitscode lautet: <strong>{{code}}</strong></p><p>Der Code ist {{ttl_minutes}} Minuten gültig.</p>';
|
|
$template = '<p>Ihr Sicherheitscode lautet: <strong>{{code}}</strong></p><p>Der Code ist {{ttl_minutes}} Minuten gültig.</p>';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return $this->replaceOtpTemplateVars($template, $code, $ttlSeconds, true);
|
|
|
|
|
|
|
+ return $this->replaceOtpTemplateVars($template, $code, $ttlSeconds, true)
|
|
|
|
|
+ . $this->renderFooterHtml();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private function replaceOtpTemplateVars(string $template, string $code, int $ttlSeconds, bool $htmlContext): string
|
|
private function replaceOtpTemplateVars(string $template, string $code, int $ttlSeconds, bool $htmlContext): string
|