How do I securely store and set password for use by SmtpClient class?
问题 I am writing a C# class that needs to send SMTP emails. I found code in this SO question which gave me what I needed to send the email (SO Question) For convenience, here is the code I am modifying from an answer to the above question: using System.Net; using System.Net.Mail; var fromAddress = new MailAddress("from@gmail.com", "From Name"); var toAddress = new MailAddress("to@example.com", "To Name"); const string fromPassword = "fromPassword"; const string subject = "Subject"; const string