Is there a reason using a different action than "send" in the form would not work even if though I change to fetch api to fetch from the new action?
Thank you very much for sharing this!
However, I have a small wonder. The code (completely copied from your example, with the only exception being the credentials) returns 405 Method Not Allowed. The error is generated by fetch() in index.js, so server.js never runs.
The result is the same regardless of whether Live Server or Parcel server is used. However, by changing to node's server and to transporter.sendMail in the code, testing of the server.js file is succesful.
Have spent a few days on the matter, would be extremely grateful if you could point out the way (hints from articles like https :// blog.airbrake.io/blog/http-errors/405-method-not-allowed and the like do not help).
Thank you!
I seem to be getting this error every time I attempt to submit the form data.
Uncaught (in promise) SyntaxError: Unexpected token E in JSON at position 0 VM713:1
Any idea what is causing it?
Hi Victory, i really enjoy your work, time and energy to make great articles on your blog.
I would buying you a cup of tea but you don't have a paypal option, so that have to wait :). i have a question about the nodemailer with js. If i try the code, the only email adres that works in the browser is the EMAIL that i set in the env. file. How can i make the code work so it accepts other adresses? Have a great day. Winston
ps.
Other email adresses give the following response: '553 5.7.1 < -------@gmail.com>: Sender address rejected: not owned by user 3@7316314' in the terminal.
if any one wants to participate and help, so please!
Thanks!
Hey Victoria thank you for your fantastic work im right now studying front end and found your tutorial but i get this error: POST igorljevak.com/send 404
the site is published on that domain
i hope you find time and can help me :D
Hello, first of all thanks a lot for sharing this to us!
I am pretty new using servers in js, especially using express, could you help me out managing what to display after the mail has been sent, I would like to keep my form page but only changing the button style instead of going to the blank page with "Email successfully sent to recipient!" but I can't figure out how to, please help me if you have time to
I learnt a lot from this, thanks for sharing!
Coder
Webdeveloper
Marsh Mallow
Soft and sweet
Thanks for the blog post, Victoria. I just want to point out that the link to the article in Step 5.2 on port numbers is broken.