Kukula Mula Kukula Mula - 1 year ago 75
HTML Question

is there a way to send an email with data from input without php or javascript just pure simple html?

I have HTML form with a textbox where user enter his email - let say to register for a newsletter and a button to join.

When clicking the button I'd like to send myself an email with a constant subject like: 'a new user joined your newsletter' and in the body of the email have the text entered by the user.

So with PHP and Javascript code its possible - i'm looking for a pure html code that does the same (in my index.html file)


<a href: mailto...>
<form action=mailto:... method=post>
<button onclick:mailto...>
opens my mail application :(

  1. Is there a way to send that email in the background (without opening the mail application) with the data from textbox in the email body?

  2. if Yes to Q.1 then is there a way to add a fixed subject

Answer Source

No, there is no way you can send email using pure html. Email is sent over SMTP protocol. A browser operates in HTTP protocol. So it's not possible to send email even using pure javascript. Only server can send data using SMTP protocol.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download