How can we send mail using JavaScript?
Answer Posted / ramesh
At jsscript tag
function sendmail(_frm)
{
var eml="you@youraddress.com";
var bod="&body="+_frm.selOne.value+" ¦¦ "+_frm.txtOne.value;
var subj="?subject=Whatever you want";
location.href="mailto:"+eml+subj+bod;
}
At Form tag
<form action="mailto:you@youraddress.com"
enctype="text/plain"
method="POST" onsubmit="sendmail(this);return false;">
| Is This Answer Correct ? | 28 Yes | 30 No |
Post New Answer View All Answers
Why is node js better than php?
What is the use of "ksort" in php?
How should a model be structured in mvc?
Is it possible to submit a form with a dedicated button?
What is php used for?
What is composer json?
What is namespace in php?
Which function you can use in php to open a file for reading or writing or for both?
Difference between get and post method.
What is php sequence?
How to turn on the session support?
Tell us how can we access the data sent through the url with the post method?
What is a closure in php?
Tell me what is the difference between characters 34 and x34?
Why json is used in php?