Skip to content

Commit

Permalink
Merge pull request #566 from antoniomika/am/fix-relay-email
Browse files Browse the repository at this point in the history
Don't send auth when both user and pass are empty
  • Loading branch information
sinamics authored Oct 2, 2024
2 parents 5fd0bee + 77bedc1 commit 01e9c08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 7 additions & 4 deletions src/utils/mail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 01e9c08

Please sign in to comment.