Thank you. I was so caught up trying to learn to transition to the route.js file and the app directory in the new Nextjs will nothing but failure after failure. Didn't think to just move it out altogether and not bother with it.
but this is basically me messaging me ? when I check who sent the email it is the user we entered so how can random people mail me for my portfolio website?
Are you inside pages or /app directory? In app you would use /app/api/contact/route.ts and in pages /pages/api/contact.js There is slightly different syntax for route handler in app directory too which you can lookup route handlers
Where can I find the contact.js in the blog?
What is the content of .env.local?
Thank you. I was so caught up trying to learn to transition to the route.js file and the app directory in the new Nextjs will nothing but failure after failure. Didn't think to just move it out altogether and not bother with it.
but this is basically me messaging me ?
when I check who sent the email it is the user we entered so how can random people mail me for my portfolio website?
what should i add in dotenv file??
Thanks man, I struggle 2 days to make nodemailer works eps for nextjs 14 but it works well now !
How i can implement with mongodb and nodemailer?
Error as
No http methods exported in contact.js
i keep getting error 404 on /api/contact even tho i've added the folder/file inside of pp directory (nextjs13)
Same here, been trying to fix this
Are you inside pages or /app directory? In app you would use /app/api/contact/route.ts and in pages /pages/api/contact.js
There is slightly different syntax for route handler in app directory too which you can lookup route handlers
I solved the problem by having the /app directory outside the /src directory.
Thanks a lot, that really helped! Another question... how do you get those auto suggestions in vs code? :D
What do i need to add to my .env.local file?
Im guessing the emails username and password.
Yours that will send the message.
Extensive video, thanks!
Hi Adam, do you know how to send attachment like .pdf via contact form using App router?
I was going to ask about the same. Did you figure it out maybe??? I'm trying to find a solution. Thank you.
What needs to be included in the .env file?
Would this be enough?
DB_USER=mymail
DB_PASS=password
Yes, that's all if anyone wonders the same
Which coding assistant you're using? It's just awesome.
GitHub Copilot
having an absolute nightmare with this, been getting endless 404's back from my routes - even in postman, no matter how i configure the url
Sending to server logic starts here 12:41
it works thank man
Thanks a lot everything works !