Reputation: 31963
Is there anyway to get an email sent without putting the password into the code ?
There are many email api-s that enables to send an email with entering the username and password.
sendEmail("[email protected]","mypass","subject","msg body");
Is there any way around the problem with hard-coding the password in code ?
Upvotes: 2
Views: 1313
Reputation: 21778
You can ask the user password one time and then store it in your internal storage. It may be necessary to add a way to change the password later if preferred. Deciding from documentation, the internal storage is even secure, while it is also possible to use additional encryption. This is how most of E-mail clients work.
Upvotes: 1
Reputation: 20936
You have three options to send email:
If you want silent way to send email then you should choose 1 or 2. But more secure way is to use the third approach.
Upvotes: 2