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
How do you end a session in php?
Which variable declarations within a class is invalid in php?
Is echo a function in php?
What is the function file_get_contents() useful for?
What is the use of strip_tags() method?
How would you determine the size of a file in php?
How cookies are transported from browsers to servers?
Explain php explode() function.
How to specify argument default values?
What is a php class?
What is the difference between associative array and indexed array?
What is the difference between laravel and php?
Tell me how can we connect to a mysql database from a php script?
Why die is used in php?
How many data types are used by php?