How to send an email using only HTML5 and CSS

后端 未结 4 1272
一生所求
一生所求 2021-02-06 09:09

I am trying to write a code which can send an email to a particular address on clicking submit button. Below i am mentioning my HTML code,on clicking submit i am not getting any

4条回答
  •  半阙折子戏
    2021-02-06 09:51

    To send an email only using HTML (on your side) you can use a service like https://formspree.io/. Services like Formspree handle all the code for you. All you have to do is setup your form to point to their email provider. If you don't like Formspree much you can try looking for alternatives, I made one myself here. The issue with Formspree is that your users will be re-directed to their website to do a captcha before the email is sent.

    For example you can use a service like this by making your form something like below:

    As you can see the form is sent to https://formspree.io/your@email.com . There are detailed instructions on formspree's website in how to use their service. Using a service like formspree is super easy as you don't have to write any of the back end that manages your form.

提交回复
热议问题