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 I expire a php session after 30 minutes?

542


Tell me what is the actually used php version?

569


What is the difference between for and foreach?

555


What is php and what does it do?

549


What are the advantages of php mysql?

523






How to get best php developer Experience in Php with Sugar CRM / VTiger.

3975


What is scope of variable in php?

582


What are the functions used in php?

513


How you can update memcached when you make changes to php?

623


What is difference between rest and http?

520


What is the role of php?

514


What is PECL?

781


Do you know how to get the ip address of the client?

522


How we can get the number of elements in an array?

8407


Define metaphone()?

8304