Add Username to MailConfig and fix typo

This commit is contained in:
Slendy 2022-10-03 23:25:18 -05:00
commit 5bc875bc04
No known key found for this signature in database
GPG key ID: 7288D68361B91428
4 changed files with 6 additions and 4 deletions

View file

@ -46,7 +46,7 @@ public class PasswordResetRequestForm : BaseLayout
if (user == null)
{
this.Status = $"A password reset request has been sent to the email {email}.\n" +
this.Status = $"A password reset request has been sent to the email {email}. " +
"If you do not receive an email verify that you have entered the correct email address";
return this.Page();
}
@ -68,7 +68,7 @@ public class PasswordResetRequestForm : BaseLayout
this.Database.PasswordResetTokens.Add(token);
await this.Database.SaveChangesAsync();
this.Status = $"A password reset request has been sent to the email {email}." +
this.Status = $"A password reset request has been sent to the email {email}. " +
"If you do not receive an email verify that you have entered the correct email address";
return this.Page();
}

View file

@ -12,6 +12,8 @@ public class MailConfiguration
public string FromName { get; set; } = "Project Lighthouse";
public string Username { get; set; } = "";
public string Password { get; set; } = "";
public bool UseSSL { get; set; } = true;

View file

@ -23,7 +23,7 @@ public class ServerConfiguration
// You can use an ObsoleteAttribute instead. Make sure you set it to error, though.
//
// Thanks for listening~
public const int CurrentConfigVersion = 12;
public const int CurrentConfigVersion = 13;
#region Meta

View file

@ -17,7 +17,7 @@ public static class SMTPHelper
client = new SmtpClient(ServerConfiguration.Instance.Mail.Host, ServerConfiguration.Instance.Mail.Port)
{
EnableSsl = ServerConfiguration.Instance.Mail.UseSSL,
Credentials = new NetworkCredential(ServerConfiguration.Instance.Mail.FromAddress, ServerConfiguration.Instance.Mail.Password),
Credentials = new NetworkCredential(ServerConfiguration.Instance.Mail.Username, ServerConfiguration.Instance.Mail.Password),
};
fromAddress = new MailAddress(ServerConfiguration.Instance.Mail.FromAddress, ServerConfiguration.Instance.Mail.FromName);