html button to send email

前端 未结 8 1440
耶瑟儿~
耶瑟儿~ 2020-12-24 02:00

How do I send an email with specified initial values for the headers subject and message from a button in html, such as this



        
相关标签:
8条回答
  • 2020-12-24 02:49

    You can not directly send an email with a HTML form. You can however send the form to your web server and then generate the email with a server side program written in e.g. PHP.

    The other solution is to create a link as you did with the "mailto:". This will open the local email program from the user. And he/she can then send the pre-populated email.

    When you decided how you wanted to do it you can ask another (more specific) question on this site. (Or you can search for a solution somewhere on the internet.)

    0 讨论(0)
  • 2020-12-24 02:51

    You can use mailto, here is the HTML code:

    <a href="mailto:EMAILADDRESS">
    

    Replace EMAILADDRESS with your email.

    0 讨论(0)
提交回复
热议问题