From 81f6f8b79d716fa816fb6cebb844e3a0a3781ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Louvet?= Date: Thu, 7 Dec 2023 13:48:02 +0100 Subject: [PATCH] fix(register): tmp deactivation of email sent --- function/Service/UserService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/function/Service/UserService.cs b/function/Service/UserService.cs index 38c7e6b..14ef6f6 100644 --- a/function/Service/UserService.cs +++ b/function/Service/UserService.cs @@ -73,11 +73,11 @@ public async Task Register(string lastName, string firstName, string birth user.AuthTokenExpiration = tokenValidityDate; // Send email - var emailValidationToken = GenerateUserToken(email, DateTime.UtcNow.AddHours(2), userId, true); - string originalEmailHtml = await File.ReadAllTextAsync(Path.Combine(BaseFunctionDirectory, "../Assets/mail-validateaccount.html")); - originalEmailHtml = originalEmailHtml.Replace("%%YES_LINK%%", $"{_functionBaseUrl}/validate/{emailValidationToken}"); - - await SendEmail(email, originalEmailHtml, string.Empty, "Validation de ton compte Plastic Origins"); + // ⚠️ Temporary deactivation of email because of MailJet issue + // var emailValidationToken = GenerateUserToken(email, DateTime.UtcNow.AddHours(2), userId, true); + // string originalEmailHtml = await File.ReadAllTextAsync(Path.Combine(BaseFunctionDirectory, "../Assets/mail-validateaccount.html")); + // originalEmailHtml = originalEmailHtml.Replace("%%YES_LINK%%", $"{_functionBaseUrl}/validate/{emailValidationToken}"); + // await SendEmail(email, originalEmailHtml, string.Empty, "Validation de ton compte Plastic Origins"); //Contract.Ensures(user != null); return user;