
How can we send mail using JavaScript?

Hi friends, You can not send email directly using JavaScript.
But you can use JavaScript to execute a client side email program send the email using the "mailto" code. Here is an example:
<html>
<head>
<title></title>
<script type="text/javascript">
function myfunction(form)
{
tdata=document.form1.text1.value;
location="mailto:abc@domain.com?subject=...";
return true;
}
</script>
</head>
<body>
<form action="#" name="form1">
<input type="text" name="text1">
<input type="submit" onClick="myfunction(this)">
</form>
</body>
</html>
Thanks...
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.