feat(HomeController): Envoie un email de validation après l'inscription à la newsletter.

This commit is contained in:
Serreau Jovann
2026-01-11 13:43:13 +01:00
parent e36e80b622
commit cf2685a750

View File

@@ -73,11 +73,11 @@ class HomeController extends AbstractController
$exit = $notifuseClient->contactExist($datas['email']); $exit = $notifuseClient->contactExist($datas['email']);
if($exit == false){ if($exit == false){
$notifuseClient->contactAdd($datas['email']); $notifuseClient->contactAdd($datas['email']);
//send email vot validation $mailer->send($datas['email'],$datas['email'],'[E-Cosplay] - Valider votre inscription à la newsletter',"mails/newsletter-valiate.twig",[
'confirmationUrl' => $this->generateUrl('app_newsletter_validate',['email'=>$datas['email']],UrlGeneratorInterface::ABSOLUTE_URL),
],[],true);
} }
$mailer->send($datas['email'],$datas['email'],'[E-Cosplay] - Valider votre inscription à la newsletter',"mails/newsletter-valiate.twig",[
'confirmationUrl' => $this->generateUrl('app_newsletter_validate',['email'=>$datas['email']],UrlGeneratorInterface::ABSOLUTE_URL),
],[],true);
return $this->render('newsletter.twig', [ return $this->render('newsletter.twig', [
'no_index' => true 'no_index' => true