feat: send accepted teamer invoices to configurable email inbox

This commit is contained in:
Björn Fromme
2026-03-15 12:42:28 +01:00
parent 3cb5b065f4
commit 3b99757a08
13 changed files with 648 additions and 4 deletions
+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);
}
}