Skip to content

Commit

Permalink
Change email configuration structure
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisnabi committed Jun 25, 2024
1 parent fab5a68 commit d595408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public async Task SendAsync(string email, string subject, string content, Cancel
using var smtpClient = new SmtpClient(_emailSettings.SmtpHost, _emailSettings.SmtpPort)
{
EnableSsl = true,
Credentials = new NetworkCredential(_emailSettings.From, _emailSettings.AppPassword)
Credentials = new NetworkCredential(_emailSettings.UserName, _emailSettings.Password)
};

var mailMessage = new MailMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ public class EmailSettings

public int SmtpPort { get; set; }

public string AppPassword { get; set; } = null!;
public string UserName { get; set; } = null!;

public string Password { get; set; } = null!;
}

0 comments on commit d595408

Please sign in to comment.