eleith / emailjs

html emails and attachments to any smtp server with nodejs
MIT License
2.19k stars 230 forks source link

error - ./node_modules/emailjs/email.js:1:0 Module not found: Can't resolve 'fs' #327

Closed 2tech-development closed 1 year ago

2tech-development commented 1 year ago

I'm trying to use email.js in my nextjs website and getting this error

error - ./node_modules/emailjs/email.js:1:0 Module not found: Can't resolve 'fs'

eleith commented 1 year ago

this library will not work in the browser as it is intended for server environments.

if you want to send emails on the server with nextjs, you may want develop email sending APIs that can respond to requests from the browser

https://nextjs.org/docs/api-routes/introduction