> 
> **Possible Duplicate:**  
> 
> [how to send email by using javascript or jquery](https://stackoverflow.com/questions/1415205/how-to-send-email-by-using-javascript-or-jquery) 
> 
> 
> 

How can I send an email with JavaScript, that is able to be read by Gmail, Yahoo, etc.?

This is what I have:

```
<script language="javascript">

       function SendEmail()
       {
           var body = escape(document.Form.textfieldName.value +"\n"+document.Form.textfieldEmail.value +"\n"+document.Form.textfieldMessage.value);

    var sTo="testmail@mail.com";

           var subject = "This is SyntaxHelpSub";

                           window.location.href =
    "mailto:"+sTo+"?subject="+subject+"&body="+body;

               }
</script>

        <div class="formfields">Name: <input class="tbox" id="textfieldName" type="text">

         Email: <input class="tbox" id="textfieldEmail" type="text">

<br><br>

Message: <input class="tbox" id="textfieldMessage" type="text" style="width: 343px">
    </div>

<br>

<input type="button" value="Send!" onclick="SendEmail()" />

```