dword-design / nuxt-mail

Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.
Other
247 stars 18 forks source link

TypeError [ERR_INVALID_CHAR]: Invalid character in statusMessage in console log after the send request. #148

Closed slzakaria closed 1 year ago

slzakaria commented 1 year ago

Hey there, i have a form on my nuxt version 3.2.3 portfolio for which i wanted to use nuxt-mail , i set up nuxt-mail as such :['nuxt-mail', { message: { to: 'recipientMail@gmail.com', }, smtp: { service: 'gmail', }, auth: { user: 'myMail@gmail.com',pass: generated google app password, }, }],
When then send request is fired this is the result i get in the console log and the request remains pending : [nitro] [dev] [unhandledRejection] TypeError [ERR_INVALID_CHAR]: Invalid character in statusMessage 22:52:04 at new NodeError (node:internal/errors:399:5) at ServerResponse.writeHead (node:_http_server:392:11) at ServerResponse._implicitHeader (node:_http_server:335:8) at write_ (node:_http_outgoing:886:9) at ServerResponse.end (node:_http_outgoing:994:5) at ServerResponse.<anonymous> (file:///Users/zackary/Documents/Coding/Code/Portfolio%20template/portfolio-main/.nuxt/dev/index.mjs:1:4996) at Object.errorHandler [as onError] (file:///Users/zackary/Documents/Coding/Code/Portfolio%20template/portfolio-main/.nuxt/dev/index.mjs:1:10682) at Server.toNodeHandle (file:///Users/zackary/Documents/Coding/Code/Portfolio%20template/portfolio-main/node_modules/h3/dist/index.mjs:1278:27) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { 22:51:43 code: 'ERR_INVALID_CHAR' } Is anyone else having the same issue ? if no how are you configuring the module for nuxt v3+ projects ?

tomekhub commented 1 year ago

@Zackaria-Slimane Did you manage to solve this problem? because I have the same one. 😞

slzakaria commented 1 year ago

@tomekhub hey buddy! Sadly i didin’t as my usecase wasn't really that reliant on this feature. And since i got no response here nor could i get it to work following the google / stackoverflow solutions

dword-design commented 1 year ago

@Zackaria-Slimane What was the solution?

slzakaria commented 1 year ago

@Zackaria-Slimane What was the solution?

@dword-design hello ! I'm sorry to say i found none. Since it wasn't a critical feature for my use case , i just replaced it by a "Email" <a href:"mailto"> button.