Skip to content

Commit

Permalink
Moved default of email port env to go code instead of docker compose …
Browse files Browse the repository at this point in the history
…(#122)
  • Loading branch information
MichaelZhao21 authored Aug 28, 2024
1 parent 1c9919c commit 971014e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion server/funcs/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 971014e

Please sign in to comment.