Can we send email from static html page?

后端 未结 4 1917
孤独总比滥情好
孤独总比滥情好 2021-01-21 19:01

I have created one html static inquiry form and i want to write a code on submit action in which when we click on submit, One email will send on my account.

How can i wr

4条回答
  •  悲&欢浪女
    2021-01-21 19:46

    Unfortunately you cant automatically send a email from a html/static file, you would have to use some server technology to process the request and send the email.

    its not to difficult to do though, so check out this tutorial from css tricks css tricks email in php tutorial

    there is also the php docs here php.net docs for mail()

    ((The above is for PHP, see asp.net email if you are using asp.net (there is also node, java, python etc, but php and c#.net are all I have experience in)

    There is always the option to use mailto

    send an email // etc
    

    However this will only open up the users email client, so could put some users off (as well as making it unusable for people without an email client (although it can be used to open up web based clients such as gmail)) so not ideal.

提交回复
热议问题