diff --git a/Yavsc/Controllers/AccountController.cs b/Yavsc/Controllers/AccountController.cs
index 8c16babc..261d1419 100644
--- a/Yavsc/Controllers/AccountController.cs
+++ b/Yavsc/Controllers/AccountController.cs
@@ -224,8 +224,8 @@ namespace Yavsc.Controllers
// Send an email with this link
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
- var emailSent = await _emailSender.SendEmailAsync(_siteSettings, _smtpSettings, model.Email, "Confirm your account",
- "Please confirm your account by clicking this link: link");
+ var emailSent = await _emailSender.SendEmailAsync(_siteSettings, _smtpSettings, model.Email, _localizer["ConfirmYourAccountTitle"],
+ string.Format(_localizer["ConfirmYourAccountBody"] , _siteSettings.Title, callbackUrl, _siteSettings.Slogan, _siteSettings.Audience));
await _signInManager.SignInAsync(user, isPersistent: false);
if (!emailSent) {
_logger.LogWarning("User created with error sending email confirmation request");
@@ -250,11 +250,16 @@ namespace Yavsc.Controllers
[Authorize,HttpPost,ValidateAntiForgeryToken]
public async Task SendEMailForConfirm () {
var user = await _userManager.FindByIdAsync( User.GetUserId() );
+ return View("ConfirmEmailSent");
+ }
+
+ private async Task SendEMailForConfirm(ApplicationUser user)
+ {
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
await _emailSender.SendEmailAsync(_siteSettings, _smtpSettings, user.Email, "Confirm your account",
"Please confirm your account by clicking this link: link");
- return View("ConfirmEmailSent");
+
}
//
// POST: /Account/LogOff
diff --git a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.en.resx b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.en.resx
index de8d8e65..0b4d64a6 100644
--- a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.en.resx
+++ b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.en.resx
@@ -774,4 +774,12 @@ Valid caracters are: underscore '_', '-', 'a' - 'z', 'A' - 'Z', '0' - '9', th
An email has been sent to confirm your addresse.
+ Please, confirm your e-mail
+ You successfully created your {0} account,
+but your e-mail address is not yet confirmed.
+Please, in order to validate it, follow this link <{1}>.
+
+Thanks.
+--
+{0} - {2}
\ No newline at end of file
diff --git a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx
index 68b3b78c..933b1db3 100644
--- a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx
+++ b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx
@@ -449,5 +449,11 @@
Confirmation du mot de passe
L'envoi de de courrier pour confirmation de l'adresse e-mail a échoué.
Un courrier a été envoyé pour confirmation de l'adresse e-mail .
+ S'il vous plait, confirmez votre addresse e-mail
+ Vous avez créé avec succès votre compte {0},
+mais votre adresse e-mail reste à confirmer.
+Pour ce faire, suivez le lien suivant : <{1}>.
+--
+{0} - {2}