From 29707f944eab4ee2561d91083dfd1ffb1d79c524 Mon Sep 17 00:00:00 2001 From: Michael Zhao Date: Wed, 28 Aug 2024 13:54:26 -0500 Subject: [PATCH] Moved default of email port env to go code instead of docker compose --- docker-compose.yml | 2 +- server/funcs/email.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index bc7cf9b..89db668 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: - MONGODB_URI=${MONGODB_URI} - JURY_ADMIN_PASSWORD=${JURY_ADMIN_PASSWORD} - EMAIL_HOST=${EMAIL_HOST} - - EMAIL_PORT=${EMAIL_PORT:587} + - EMAIL_PORT=${EMAIL_PORT} - EMAIL_FROM=${EMAIL_FROM} - EMAIL_FROM_NAME=${EMAIL_FROM_NAME} - EMAIL_USERNAME=${EMAIL_USERNAME} diff --git a/server/funcs/email.go b/server/funcs/email.go index f42abed..9e94baa 100644 --- a/server/funcs/email.go +++ b/server/funcs/email.go @@ -41,7 +41,7 @@ func SendJudgeEmail(judge *models.Judge, hostname string) error { // SMTP server configuration smtpHost := config.GetEnv("EMAIL_HOST") - smtpPort := config.GetEnv("EMAIL_PORT") + smtpPort := config.GetOptEnv("EMAIL_PORT", "587") // Auth auth := smtp.PlainAuth("jury", username, password, smtpHost)