Rewrite email function to support non-Gmail SMTP server
Opened this issue · 0 comments
certicky commented
Function sendEmailViaGmail()
in /server/EmailUtil.java
tries to use Gmail's SMTP server to send emails and authenticate using the email & password. This is hard-coded in the function, which is a problem, because Gmail no longer supports this.
Solution:
- Replace
GmailFromEmail
andGmailEmailPassword
keys inserver_settings.ini.template
with new keysSMTPAccount
andSMTPEmail
. - Add two new keys to
server_settings.ini.template
:SMTPServerURL
andSMTPServerPort
- Rewrite the
sendEmailViaGmail()
function so that it uses the fourSMTP*
values from the settings file instead of the old ones and hard-coded ones.