Saturday, 17 May 2014

How to Send Mail In PHP Code

function seMail($to,$from,$subject,$message){
  $headers = "MIME-Version: 1.0\r\n";
        $headers .= "Content-type: text/html; charset=iso-8859-1". "\r\n";
        $headers  .= "From: $from\r\n";
        mail($to, $subject, $message, $headers);
 }

if($_POST['submit'])
  {
    $pid= $_REQUEST[pid]
    $price= $_REQUEST[price]
    $weight= $_REQUEST[weight]
    $qty= $_REQUEST[qty]
    $firstname= $_REQUEST[firstname]
    $lastname= $_REQUEST[lastname]
    $road= $_REQUEST[road]
    $pincode= $_REQUEST[pincode]
    $place= $_REQUEST[place]
    $land= $_REQUEST[land]
    $mail= $_REQUEST[mail]
    $phone= $_REQUEST[phone]
    $comment= $_REQUEST[comment]
    $page= $_REQUEST[page]
    $files= $_REQUEST[files]
    $PHPSESSID= $_REQUEST[PHPSESSID]
    $message="Here Your HTML EMAIL Templet";

//=================== msg for  sale ===================
seMail($mail,"satyam@fastconversion.com","Thanks for Contact Us",$message);
$thankMsg="Thank You For Contact Us.";
 } ?>

No comments :

Post a Comment