Home »

How can we send mail using JavaScript?

Question ListCategory: PHPHow can we send mail using JavaScript?
shah_kajal184 author asked 10 years ago
2 Answers
denielshakespeare5 author answered 8 years ago

JavaScript does not have any networking capabilities as it isdesigned to work on client site. As a result we can not send mails usingJavaScript. But we can call the client side mail protocol mailtovia JavaScript to prompt for an Email to send. this requires the client to approve it.

jamessmith05 author answered 8 years ago

No. There is no way to send emails 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:function myfunction(form)
{
tdata=document.myform.tbox1.value;
location=”mailto:mailid@domain.com?subject=…”;
return true;
}

Please login or Register to Submit Answer