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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -