I am implementing an Email service on my backend with Spring Email. There are a lot of good examples on how to do that but I can't see a way to avoid having to store the password for the account as plaintext in a config file or so:
spring.mail.username=office@company.com
spring.mail.password=the-password
If there a better way to do this?
I do not quite see the point of doing this because in my case I'd have to store the password in my Procfile
(used by heroku to start up the server):
web: java $JAVA_OPTS -Djasypt.encryptor.password=<still-not-safe> -Dserver.port=$PORT -jar target/*.jar
and that's just moving the password from one config file to another.