diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index e5f302f1..9934fb00 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -24,7 +24,7 @@ services: volumes: - .:/workspaces:cached environment: - NEXTAUTH_URL: "http://10.0.0.217:3000" # Update this to the URL of your dev environment + NEXTAUTH_URL: "${NEXTAUTH_URL:-http://10.0.0.217:3000}" networks: - app-network depends_on: diff --git a/src/utils/mail.ts b/src/utils/mail.ts index 0a0f560e..3289986c 100644 --- a/src/utils/mail.ts +++ b/src/utils/mail.ts @@ -277,10 +277,13 @@ export async function createTransporter() { host: globalOptions.smtpHost, port: globalOptions.smtpPort, secure: globalOptions.smtpUseSSL, - auth: { - user: globalOptions.smtpUsername, - pass: globalOptions.smtpPassword, - }, + auth: + globalOptions.smtpUsername || globalOptions.smtpPassword + ? { + user: globalOptions.smtpUsername, + pass: globalOptions.smtpPassword, + } + : undefined, tls: { rejectUnauthorized: true, minVersion: "TLSv1.2",