php - adding some text into message in mail -
$contactname = $_post['contactname']; $email = $_post['email']; $message = $_post['message']; $subject = 'Ձեզ գրել են ձեր կայքից'; $to = 'stereoshoots@gmail.com'; $headers = "from: ".$email; mail($to,$sub,$message,$headers);
i got $contactname (client name). task text :
from : $contactname
$message (the text client wrote).
how should implant name text?
you can costumise, below, from contact name
in case, $from
<?php $to = "someone@example.com"; $subject = "Ձեզ գրել են ձեր կայքից"; $message = "hello! simple email message."; $from = "someonelse@example.com"; $headers = "from:" . $from; if(mail($to,$subject,$message,$headers)){ echo "mail sent.";} else{ echo "mail not sent"; } ?>
Comments
Post a Comment