fork download
  1. <input type="button" onclick="jMail()" value="Send Mail"/>
  2. <script>
  3. function jMail()
  4. {
  5. alert("Inside Javascript Function");
  6. alert("<?php PHPFunction(); ?>");
  7. }
  8. </script>
  9.  
  10. <?php
  11. function PHPFunction(){
  12. echo ("Inside PHP Function");
  13. mail("to@example.com","Help Mee","Definitely Help me","From:from@example.com");
  14. echo ("Mail Sent");
  15. }
  16. ?>
Success #stdin #stdout #stderr 0.01s 20592KB
stdin
Standard input is empty
stdout
<input type="button" onclick="jMail()" value="Send Mail"/>        
<script>
function jMail()
{
alert("Inside Javascript Function");
alert("Inside PHP FunctionMail Sent");
}
</script>

stderr
sh: /usr/sbin/sendmail: not found