Can AlertByEmail use parameters configured in Preferences > Email settings?
Author: maximgl
Creation Date: 8/2/2018 3:45 AM
profile picture

maximgl

#1
Hello,

I would like to use AlertByEmail functionality, but I do not want to store my email password in the source code. Since I already have all parameters set up in preferences, is there a way to use these parameters from my code?

Thanks,
Maxim
profile picture

Eugene

#2
It's a good idea to pick up the params from the WealthLabConfig.txt. The catch here is that the EmailPassword is encrypted and even if the encryption key could be derived by reverse-engineering the WLP client, there's no way for it to land in the open source code of Community Components. This would be a violation.

If you're concerned about your password's safety there in fact are different options like:

1. The easiest way is to set up a dummy SMTP email account just for mail forwarding to your primary account. For example, any Gmail can be configured to forward incoming mail to a verified 3rd party account. Sign up for a new Gmail account and store this proxy account's password in the source code w/o the risk of revealing your primary account's password.

2. Follow .NET guidelines on securely storing passwords locally (or devise your own encryption class):

https://stackoverflow.com/questions/4155187/securing-a-password-in-source-code
https://stackoverflow.com/questions/16957492/c-sharp-securely-storing-a-password-locally

etc.
profile picture

maximgl

#3
Thank you. I've set up a dummy SMTP account for mail forwarding.
profile picture

Eugene

#4
You're welcome.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).