mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-08 16:40:15 +02:00
fix: use global mailer From header for password reset email (#190)
Remove the hardcoded from address (info@tijdvoordetest.nl) so the global headers.From in mailer.yaml is used instead, which includes the "Tijd voor de test" display name and the correct noreply sender.
This commit is contained in:
@@ -11,7 +11,6 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Mailer\MailerInterface;
|
use Symfony\Component\Mailer\MailerInterface;
|
||||||
use Symfony\Component\Mime\Address;
|
|
||||||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
@@ -132,7 +131,6 @@ final class ResetPasswordController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$email = new TemplatedEmail()
|
$email = new TemplatedEmail()
|
||||||
->from(new Address('info@tijdvoordetest.nl', 'Tijd voor de Test'))
|
|
||||||
->to($user->getUserIdentifier())
|
->to($user->getUserIdentifier())
|
||||||
->subject($translator->trans('Your password reset request'))
|
->subject($translator->trans('Your password reset request'))
|
||||||
->htmlTemplate('reset_password/email.html.twig')
|
->htmlTemplate('reset_password/email.html.twig')
|
||||||
|
|||||||
Reference in New Issue
Block a user