feat: route app_unsubscribe + fix envoi email bienvenue
UnsubscribeController :
- Route GET /unsubscribe/{email}/{token} (app_unsubscribe)
- Vérifie le token HMAC via UnsubscribeManager::isValidToken
- Si valide : désabonne l'email + page succès
- Si invalide : page erreur avec contact unsubscribe@siteconseil.fr
Templates :
- unsubscribe/success.html.twig : confirmation glassmorphism
- unsubscribe/invalid.html.twig : erreur glassmorphism
ClientsController :
- sendWelcomeEmail : suppression try/catch silencieux pour laisser
remonter les erreurs (sinon mail jamais envoyé sans diagnostic)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
14
templates/unsubscribe/invalid.html.twig
Normal file
14
templates/unsubscribe/invalid.html.twig
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Lien invalide - CRM SITECONSEIL{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="flex items-center justify-center min-h-[calc(100vh-4rem)] px-4">
|
||||
<div class="w-full max-w-sm glass-heavy p-8 text-center">
|
||||
<div class="text-red-600 text-4xl mb-4">✗</div>
|
||||
<h1 class="text-lg font-bold uppercase mb-2">Lien invalide</h1>
|
||||
<p class="text-sm text-gray-500">Ce lien de desabonnement est invalide ou a expire.</p>
|
||||
<p class="text-xs text-gray-400 mt-4">Contactez <strong>unsubscribe@siteconseil.fr</strong> pour vous desabonner manuellement.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
14
templates/unsubscribe/success.html.twig
Normal file
14
templates/unsubscribe/success.html.twig
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Desabonnement - CRM SITECONSEIL{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="flex items-center justify-center min-h-[calc(100vh-4rem)] px-4">
|
||||
<div class="w-full max-w-sm glass-heavy p-8 text-center">
|
||||
<div class="text-green-600 text-4xl mb-4">✓</div>
|
||||
<h1 class="text-lg font-bold uppercase mb-2">Desabonnement confirme</h1>
|
||||
<p class="text-sm text-gray-500">L'adresse <strong>{{ email }}</strong> ne recevra plus d'emails commerciaux de SITECONSEIL.</p>
|
||||
<p class="text-xs text-gray-400 mt-4">Pour vous reabonner, contactez <strong>contact@siteconseil.fr</strong>.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user