Feat: Implement email notification about new disposition

This commit is contained in:
Björn Fromme committed 2023-11-08 11:08:27 +01:00
1 parent c4e0ef7d5a
commit 342119a456
14 files changed
+129 -69

No files matched your search

-28
View File
@@ -1,28 +0,0 @@
<?php
namespace App\Email;
use App\Entity\User;
use Psr\Log\LoggerInterface;
class WelcomeEmailMailer
{
public function __construct(private readonly Mailer $mailer, private readonly LoggerInterface $logger)
{}
public function send(User $user): void
{
$this->mailer->createAndSendEmail([
'user' => $user,
], [
'to' => $user->getEmail(),
'subject' => 'Willkommen bei MyE&P Team',
'template' => 'email/welcome.html.twig',
]);
$this->logger->info('Send welcome email', [
'user_id' => $user->getId(),
'user_email' => $user->getEmail(),
]);
}
}