How can we send mail using JavaScript?

Answer Posted / naaz

There is no way of sending an email with javascript alone.
Your only possible option is to use a server-side script
(PHP, Perl, ASP) to email the form results to you.
To be more specific, your <FORM> line would look something
like this:

<form method=yest action=myscript.cgi>

The file "myscript.cgi" is a Perl or PHP program you wrote
and uploaded to the server. That program displays the
results to the user and then emails you the results.

It's just a misleading point to say u can still send an
email thru javascript (mailto:) plz understand that it
only opens a client side email program but doesnt send an y
email you wud definitely need a server side language to
send an email

cheerss

Is This Answer Correct ?    99 Yes 30 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain soundex() and metaphone().

574


What is cookie and session in php?

505


Is php front end or back end?

507


What is the use of header in php?

526


What is string function sql?

522






Code to upload a file in PHP?

553


How to get the total number of values in an array?

521


Is time a dependent variable?

516


What is the difference between $argv and $argc? Give example?

504


Can we use php variable in javascript?

530


What is local variable in php?

502


Can you specify the "new line" character in single-quoted strings?

541


Explain about PHP filter and why it should be used?

555


What u mean by query?

481


What is html used for?

553