Desired outcome
src/utils/email.ts and the nodemailer dependency are removed, or the module is actually wired up.
Why it matters
src/utils/email.ts exports sendEmail() built on nodemailer and a smtpOptions block reading EMAIL_SERVER_HOST, EMAIL_SERVER_PORT, EMAIL_SERVER_USER, EMAIL_SERVER_PASSWORD, and EMAIL_FROM. A grep across src/ shows nothing imports it:
$ grep -rn "sendEmail\|utils/email" src
src/utils/email.ts:20:export const sendEmail = async (data: EmailPayload) => {
The contact form does not use it either. src/components/Contact/useContactForm.ts posts to ${apiBaseUrl}/api/contact on a separate API host.
The cost is real: nodemailer and @types/nodemailer stay in package.json for nothing, the file still carries the placeholder comment "Replace with your SMTP credentials", and .env.example implies SMTP configuration this site never performs. It also sets a trap for anyone who "fixes" the contact form by calling it and discovers nodemailer does not run on the Cloudflare/next-on-pages runtime this project targets.
Steps
- Confirm nothing imports
src/utils/email.ts (the grep above).
- Delete the file, remove
nodemailer and @types/nodemailer from package.json, and refresh the lockfile.
- Remove the now-unused
EMAIL_SERVER_* and EMAIL_FROM entries from .env.example.
- If the module is intentionally kept for a planned feature, say so in a comment instead and close this.
Claiming this
Comment below to claim it. A reply usually comes within a day.
Desired outcome
src/utils/email.tsand thenodemailerdependency are removed, or the module is actually wired up.Why it matters
src/utils/email.tsexportssendEmail()built onnodemailerand asmtpOptionsblock readingEMAIL_SERVER_HOST,EMAIL_SERVER_PORT,EMAIL_SERVER_USER,EMAIL_SERVER_PASSWORD, andEMAIL_FROM. A grep acrosssrc/shows nothing imports it:The contact form does not use it either.
src/components/Contact/useContactForm.tsposts to${apiBaseUrl}/api/contacton a separate API host.The cost is real:
nodemailerand@types/nodemailerstay inpackage.jsonfor nothing, the file still carries the placeholder comment "Replace with your SMTP credentials", and.env.exampleimplies SMTP configuration this site never performs. It also sets a trap for anyone who "fixes" the contact form by calling it and discovers nodemailer does not run on the Cloudflare/next-on-pagesruntime this project targets.Steps
src/utils/email.ts(the grep above).nodemailerand@types/nodemailerfrompackage.json, and refresh the lockfile.EMAIL_SERVER_*andEMAIL_FROMentries from.env.example.Claiming this
Comment below to claim it. A reply usually comes within a day.