From 74eec234439f643df66c2ac31f09ae543c0aab57 Mon Sep 17 00:00:00 2001 From: mARTin Date: Sun, 1 Mar 2026 14:40:02 +0100 Subject: [PATCH] fix(email): change fallback sender to carrylight.de to prevent SPAM rejection chore(release): bump version to 1.8.2 --- package.json | 2 +- src/lib/email.ts | 2 +- test-conn.js | 22 ---------------------- test-db-2.js | 24 ------------------------ test-db.js | 17 ----------------- test-email-auth.js | 35 ----------------------------------- test-email-auth2.js | 26 ++++++++++++++++++++++++++ test-orig.js | 23 ----------------------- test-tokens.js | 18 ------------------ 9 files changed, 28 insertions(+), 141 deletions(-) delete mode 100644 test-conn.js delete mode 100644 test-db-2.js delete mode 100644 test-db.js delete mode 100644 test-email-auth.js create mode 100644 test-email-auth2.js delete mode 100644 test-orig.js delete mode 100644 test-tokens.js diff --git a/package.json b/package.json index ea42692..58988bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.8.1", + "version": "1.8.2", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/lib/email.ts b/src/lib/email.ts index d574cd2..fb07831 100644 --- a/src/lib/email.ts +++ b/src/lib/email.ts @@ -106,7 +106,7 @@ export async function sendVerificationEmail( `; - const from = process.env.SMTP_FROM || '"My Weekly ToDo\'s" '; + const from = process.env.SMTP_FROM || '"My Weekly ToDo\'s" '; console.log(`[EMAIL] Sending verification email to ${email} from ${from}`); console.log(`\n======================================================`); console.log(`[DEV VERIFICATION LINK]:\n${verifyLink}`); diff --git a/test-conn.js b/test-conn.js deleted file mode 100644 index 42cba1d..0000000 --- a/test-conn.js +++ /dev/null @@ -1,22 +0,0 @@ -const { PrismaClient } = require('@prisma/client'); - -const prisma = new PrismaClient({ - datasources: { - db: { - url: "postgresql://postgres:pLQjZtDLYtAMu+ut5LamR5o9P1cgPE9Z@192.168.178.201:5432/postgres" - }, - }, -}) - -async function main() { - try { - const userCount = await prisma.user.count(); - console.log(`Connection successful! Users: ${userCount}`); - process.exit(0); - } catch (error) { - console.error('Connection failed:', error); - process.exit(1); - } -} - -main(); diff --git a/test-db-2.js b/test-db-2.js deleted file mode 100644 index 3030dee..0000000 --- a/test-db-2.js +++ /dev/null @@ -1,24 +0,0 @@ -const { PrismaClient } = require('@prisma/client'); - -const prisma = new PrismaClient({ - datasources: { - db: { - url: "postgresql://postgres:SH8P%2FhUQljT4XahQVELX3Q%3D%3D@192.168.178.201:5432/postgres?pgbouncer=true" - }, - }, -}) - -async function main() { - try { - const userCount = await prisma.user.count(); - const taskCount = await prisma.task.count(); - console.log(`Users in database: ${userCount}`); - console.log(`Tasks in database: ${taskCount}`); - process.exit(0); - } catch (error) { - console.error('Error connecting to database:', error); - process.exit(1); - } -} - -main(); diff --git a/test-db.js b/test-db.js deleted file mode 100644 index 83d4345..0000000 --- a/test-db.js +++ /dev/null @@ -1,17 +0,0 @@ -const { PrismaClient } = require('@prisma/client'); -const prisma = new PrismaClient(); - -async function main() { - try { - const userCount = await prisma.user.count(); - const taskCount = await prisma.task.count(); - console.log(`Users in database: ${userCount}`); - console.log(`Tasks in database: ${taskCount}`); - process.exit(0); - } catch (error) { - console.error('Error connecting to database:', error); - process.exit(1); - } -} - -main(); diff --git a/test-email-auth.js b/test-email-auth.js deleted file mode 100644 index ab616c3..0000000 --- a/test-email-auth.js +++ /dev/null @@ -1,35 +0,0 @@ -const nodemailer = require('nodemailer'); - -const transporter = nodemailer.createTransport({ - host: "w00ff033.kasserver.com", - port: 587, - secure: false, // true for 465, false for 587 - auth: { - user: "mail@carrylight.de", - pass: "QijU8e2A8p3FE8WS8esR", - }, -}); - -async function main() { - try { - console.log("Verifying connection..."); - await transporter.verify(); - console.log("Server is ready to take our messages"); - - console.log("Sending test email..."); - const info = await transporter.sendMail({ - from: '"Test" ', - to: "mail@martin-bierschenk.de", - subject: "Test Verification Email", - text: "This is a test email.", - }); - - console.log("Message sent: %s", info.messageId); - process.exit(0); - } catch (error) { - console.error("Error sending email:", error); - process.exit(1); - } -} - -main(); diff --git a/test-email-auth2.js b/test-email-auth2.js new file mode 100644 index 0000000..521e87d --- /dev/null +++ b/test-email-auth2.js @@ -0,0 +1,26 @@ +const nodemailer = require('nodemailer'); + +const transporter = nodemailer.createTransport({ + host: "w00ff033.kasserver.com", + port: 587, + secure: false, + auth: { user: "mail@carrylight.de", pass: "QijU8e2A8p3FE8WS8esR" }, + tls: { rejectUnauthorized: false }, +}); + +async function main() { + try { + const info = await transporter.sendMail({ + from: '"My Weekly ToDo\'s" ', + to: "mail@martin-bierschenk.de", + subject: "Test from config", + html: "

Test

", + }); + console.log("Message sent:", info.messageId); + process.exit(0); + } catch (error) { + console.error("Error:", error); + process.exit(1); + } +} +main(); diff --git a/test-orig.js b/test-orig.js deleted file mode 100644 index 80e45dc..0000000 --- a/test-orig.js +++ /dev/null @@ -1,23 +0,0 @@ -const { PrismaClient } = require('@prisma/client'); - -const prisma = new PrismaClient({ - datasources: { - db: { - url: "postgresql://root:WKE7xeZohxdZit7eObjG@192.168.178.91:2665/My-Weekly-ToDo-List?schema=public" - }, - }, -}) - -async function main() { - try { - const userCount = await prisma.user.count(); - const taskCount = await prisma.task.count(); - console.log(`Original DB - Users: ${userCount}, Tasks: ${taskCount}`); - process.exit(0); - } catch (error) { - console.error('Error connecting to original DB:', error); - process.exit(1); - } -} - -main(); diff --git a/test-tokens.js b/test-tokens.js deleted file mode 100644 index 624ef06..0000000 --- a/test-tokens.js +++ /dev/null @@ -1,18 +0,0 @@ -const { PrismaClient } = require('@prisma/client'); - -const prisma = new PrismaClient(); - -async function main() { - try { - const tokens = await prisma.verificationToken.findMany(); - const users = await prisma.user.findMany(); - console.log("Tokens:", tokens); - console.log("Users:", users); - process.exit(0); - } catch (error) { - console.error('Error fetching data:', error); - process.exit(1); - } -} - -main();