Added PDF for pregenerated PDF

This commit is contained in:
Torsten Schulz
2023-12-27 18:19:27 +01:00
parent 547e4bbb6f
commit 82a68012ae
746 changed files with 139205 additions and 3620 deletions

View File

@@ -449,11 +449,15 @@ class Renderer {
return $mail;
}
protected function sendMail(PHPMailer $mail, string $subject, string $body, string $signature): void {
protected function sendMail(PHPMailer $mail, string $subject, string $body, string $signature, $attachments = []): void {
$completeBody = $body . $signature . $this->emailLegalInformation();
$mail->Subject = $subject;
$mail->Body = $completeBody;
$mail->AltBody = 'Diese Email benötigt HTML-Ansicht';
foreach ($attachments as $fileName => $attachment) {
$mail->addStringAttachment($attachment['content'], $fileName, 'base64', $attachment['type']);
}
$mail->send();
}