feat: send accepted teamer invoices to configurable email inbox

This commit is contained in:
Björn Fromme committed 2026-02-18 17:01:32 +01:00
1 parent 6d65e4c8e9
commit d9fbd604ac
13 files changed
+648 -4

No files matched your search

+11 -1
View File
@@ -1,8 +1,13 @@
<?php
declare(strict_types=1);
namespace App\Model;
class EmailAttachmentDto
use App\Email\EmailAttachmentInterface;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
class EmailAttachmentDto implements EmailAttachmentInterface
{
public function __construct(
private readonly string $name,
@@ -25,4 +30,9 @@ class EmailAttachmentDto
{
return $this->mimeType;
}
public function attachTo(TemplatedEmail $email): void
{
$email->attach($this->content, $this->name, $this->mimeType);
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace App\Model;
use App\Email\EmailAttachmentInterface;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
class EmailPathAttachmentDto implements EmailAttachmentInterface
{
public function __construct(
private readonly string $path,
private readonly string $name,
private readonly string $mimeType = 'application/pdf',
) {
}
public function getPath(): string
{
return $this->path;
}
public function getName(): string
{
return $this->name;
}
public function getMimeType(): string
{
return $this->mimeType;
}
public function attachTo(TemplatedEmail $email): void
{
$email->attachFromPath($this->path, $this->name, $this->mimeType);
}
}