I am working on an ASP.NET Core MVC web application, and in my code, I am sending an e-mail using the Gmail SMTP server. To do so, I need to pass the username and password.
Currently I have the password in my code, but I am not sure what is the best place to store the password in an ASP.NET Core MVC app? For example in the web.config
or in the database?