diff --git a/web/lib/mail.ts b/web/lib/mail.ts deleted file mode 100644 index 4582150..0000000 --- a/web/lib/mail.ts +++ /dev/null @@ -1,35 +0,0 @@ -import nodemailer from 'nodemailer' - -const transporter = nodemailer.createTransport({ - host: process.env.MAIL_HOST, - port: process.env.MAIL_PORT, - secure: false, - auth: { - user: process.env.MAIL_USER, - pass: process.env.MAIL_PASS, - }, -}) - -export const sendMail = async ({ - to, - cc, - bcc, - subject, - html, - from, -}: { - to: string - cc?: string - bcc?: string - subject: string - html: string - from?: string -}) => { - const options = { to, cc, bcc, subject, html, from } - if (!from) { - options.from = process.env.MAIL_FROM - } - - const info = await transporter.sendMail(options) - console.log('Message sent: %s', info.messageId) -} diff --git a/web/package.json b/web/package.json index be3ed6d..a63d9c8 100644 --- a/web/package.json +++ b/web/package.json @@ -40,7 +40,6 @@ "next": "14.2.26", "next-auth": "^4.24.10", "next-themes": "^0.4.3", - "nodemailer": "^6.9.16", "papaparse": "^5.4.1", "prisma": "^5.22.0", "react": "^18.2.0", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 0d1386f..2c9f6a5 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -92,9 +92,6 @@ importers: next-themes: specifier: ^0.4.3 version: 0.4.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - nodemailer: - specifier: ^6.9.16 - version: 6.9.16 papaparse: specifier: ^5.4.1 version: 5.4.1 @@ -6395,7 +6392,8 @@ snapshots: node-releases@2.0.18: {} - nodemailer@6.9.16: {} + nodemailer@6.9.16: + optional: true normalize-path@3.0.0: {}