Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending email without hard-coding username and password

Tags:

c#

email

gmail

Is there any way of sending an email from C# without manually coding my user name and password using Gmail SMTP?

I know that there is some software that can see the source code, and I don't really like them seeing my Gmail password.

like image 523
funerr Avatar asked Sep 01 '11 12:09

funerr


1 Answers

You shouldn't be using your user name and password in an application that someone else is running.

Modify the application so that it prompts the user for their e-mail credentials and use those.

This will have to be stored in a configuration file and can still be read by someone else unless you store the hashedencrypted password.

like image 100
ChrisF Avatar answered Sep 29 '22 10:09

ChrisF