I am developing a static website where in i want to send an email when HTML \"Send Button\" is clicked. IF it is possible it would be nice if u can share the code
Th
In short: Forget it.
If you want to send email with the slightest resemblance of reliability, use a server side process. If you want to use JavaScript then you can use Ajax to pass the data to that server side process and/or SSJS.
I'm sorry but just with a static website you can't do it. One imaginable possibility would be make a very complex javascript code to access one webmail account you have, login there and send the email using this account to you. It's theoretically possible, but I've never seen something like it...
It is possible ;-)
<input type="submit" value="Send" onclick="window.location ='mailto:email@address.com' "/>
It is not possible to send email from Javascript, you'll need to write a page in a language like PHP to receive the POST data and use the mail() command there.
short answer: No!
Long answer: No, you can't send emails from static pages even using javascript. What you can do is to use ajax to send email from your html form.