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


Please Help Members By Posting Answers For Below Questions

How do you end a session in php?

552


Name some of the functions in php.

496


Where are php configuration settings stored?

529


What is the method to register a variable into a session?

486


What the difference between the 'bitwise and' operator and the 'logical and' operator?

518






What is the difference between htmlentities and htmlspecialchars in php?

475


How to calculate the difference between two dates using php?

541


How many types of inheritances used in php and how we achieve it.

481


What does the function get_magic_quotes_gpc() means?

501


How do I run a php program in dreamweaver?

532


What is substr() in php? And how it is used?

520


How to track user logged out or not? When user is idle?

510


How to execute an sql query?

511


Where php language is used?

522


What is php routing?

512