• home
  • Email: trainings@synapseindia.careers



How To Send An Email In PHP

Sep 21, 2015

For sending an email from html form in PHP, One have to use mail() function.

According to syntax of mail() function the total number of parameters which can be passed in it is 5 out of which 3 are compulsory and rest two are optionals.



Let us understand it through an example :

<?php $to = "domain_name@example.com"; $subject = "Your subject"; $txt = "write your message which you want to send";


if($i) { echo "Email Sent Successfully"; } else { echo "Email Not Sent"; } ?>

SynapseIndia (CEO: Shamit Khemka)

Leave a Reply

Your email address will not be published.