0

I am creating a website and I am still a novice in Backend. So I am making my site using HTML and CSS only. I was making a contact section with a form using input boxes and was wondering if there was a way that when a user enters details and submit the form, the content gets sent to my mail without the use of Javascript or any other backend?

I thought of using mailto, but I am unsure how that would work. If there is any other way, do let me know. Thank you

  • You can't. To send mails backend is required. `mailto` link simply opens the default mailing app on your device loading the *email address* into the *to field* – galalem Mar 07 '23 at 10:34
  • Does this answer your question? [How to send an email from JavaScript](https://stackoverflow.com/questions/7381150/how-to-send-an-email-from-javascript) – Nico Haase Mar 15 '23 at 08:22

1 Answers1

1

you can not send email without javascript, but you can do it without backend(do not think that JS necessarily means backend) using third party libraries like emailJS, there is no code in your question so I will just tell you the steps of how to send email using emailJS:

  1. create account on emailjs, it has free package.
  2. you have make your template in their website and copy template ID and user ID and put it inside of your code. you can see all the docs here, they have pretty good docs https://www.emailjs.com/docs/tutorial/overview/
  • 1
    I wouldn't say that is "without backend", you're just paying someone else to host the server that sends the email. – DBS Mar 07 '23 at 10:39
  • 1
    first of all, its free. and second of all, it is without backend for the author, because author is not making anything backend-related – Y U K I M U R A Mar 07 '23 at 10:43
  • 2
    It's a perfectly valid answer, I'm just clarifying that this still has a backend and you will likely need to pay for it (The free option is labeled as "For Testing", and is limited to "200 monthly requests", so probably won't be suitable for anything but the smallest personal websites) – DBS Mar 07 '23 at 10:54