Rework the flow of setting email from the website

This commit is contained in:
Slendy 2023-01-02 02:23:14 -06:00
parent 3f70563e1d
commit cf1769ca77
No known key found for this signature in database
GPG key ID: 7288D68361B91428
8 changed files with 47 additions and 94 deletions

View file

@ -88,7 +88,7 @@ public class SendVerificationEmailPage : BaseLayout
$"To verify your account, click the following link: {ServerConfiguration.Instance.ExternalUrl}/verifyEmail?token={verifyToken.EmailToken}\n\n\n" +
"If this wasn't you, feel free to ignore this email.";
this.Success = SMTPHelper.SendEmail(user.EmailAddress, "Project Lighthouse Email Verification", body);
this.Success = await SMTPHelper.SendEmailAsync(user.EmailAddress, "Project Lighthouse Email Verification", body);
// Don't send another email for 30 seconds
recentlySentEmail.TryAdd(user.UserId, TimeHelper.TimestampMillis + 30 * 1000);