|
-
Apr 2nd, 2011, 11:01 PM
#1
Thread Starter
Frenzied Member
Allow email sending, but encrypt settings
Gents,
I'm wanting to allow "Email notifications" from my application, where by the user would supply their gmail username, password and a "to" address to send the notifications to. I am storing these as application settings, but obviously they'll be unencrypted in the config file.
What's the best way to do this?
I thought about just requiring them to type in their password each time they run the application, that way nothing is stored, but this isn't user-friendly. Is there a different way to send email from the application, much like other apps do where there's a "submit a problem" type functionality?
Thanks.
-
Apr 2nd, 2011, 11:04 PM
#2
Re: Allow email sending, but encrypt settings
 Originally Posted by stateofidleness
Gents,
I'm wanting to allow "Email notifications" from my application, where by the user would supply their gmail username, password and a "to" address to send the notifications to. I am storing these as application settings, but obviously they'll be unencrypted in the config file.
What's the best way to do this?
I thought about just requiring them to type in their password each time they run the application, that way nothing is stored, but this isn't user-friendly. Is there a different way to send email from the application, much like other apps do where there's a "submit a problem" type functionality?
Thanks.
JMC has a codebank entry I think, about encrypting the configuration file and using that. You could probably check that out. His example is for database credentials, I think. But, credentials are credentials :P
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Apr 2nd, 2011, 11:19 PM
#3
Re: Allow email sending, but encrypt settings
As WD says. Follow the CodeBank link in my signature and check out my Protected Configuration thread.
That said, there are a couple of things to consider. My code edits the primary config file, which means that the current user must have write access to the Program Files folder. If you're using My.Settings, the default values will be stored in the primary config file but the current values will be stored in the user config file. I haven't ever tested whether encrypting a section in the primary config file will propagate to the user config file.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|