Feat: Implement email notification about new disposition
This commit is contained in:
1 parent
c4e0ef7d5a
commit
342119a456
14 files changed
+129
-69
No files matched your search
@@ -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(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user