Browse Source
Merge pull request #70 from vernu/dev
remove unused dependencies
pull/71/head
Israel Abebe
11 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
2 additions and
40 deletions
-
web/lib/mail.ts
-
web/package.json
-
web/pnpm-lock.yaml
|
|
|
@ -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) |
|
|
|
} |
|
|
|
@ -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", |
|
|
|
|
|
|
|
@ -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: {} |
|
|
|
|
|
|
|
|