certicky/sscait-tournamentmanager

Rewrite email function to support non-Gmail SMTP server

Opened this issue · 0 comments

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 and GmailEmailPassword keys in server_settings.ini.template with new keys SMTPAccount and SMTPEmail.
  • Add two new keys to server_settings.ini.template: SMTPServerURL and SMTPServerPort
  • Rewrite the sendEmailViaGmail() function so that it uses the four SMTP* values from the settings file instead of the old ones and hard-coded ones.