I have an App that will send authenticated emails using System.Net.Mail and System.Net.NetworkCredential my question is how should I store the password that is needed to create a NetworkCrednetial object?
The application doesn't have a login but I could setup an option that allows the user to enter their email credentials (in almost all cases this will be their windows login). I can't use Active Directory because not every customer uses it.
I could get the password from the user and then persist it to the users registry, a file or a database. Obviously i'd have to encrypt it. I'm not very familiar with encryption so some pointers would be appreciated if people think thats the best mechanism.
My preference would be to avoid having to store anything, so is there anyway I can get around having to store the credentials myself, perhaps I can get it from the current login or somewhere else?