PHP mail() ; www-data
Posted: Sun Mar 16, 2014 5:12 pm
So i have apache on my linux (ubuntu), to send mails i installed ssmtp. My problem is that every mail haves "name" www-data,for example: http://prntscr.com/30sgp5. How can i change this "name" ?
My code is:
I know that this is nost secure but first i just wanna make it work,ty for help.
My code is:
Code: Select all
$ime=$_POST['ime'];
$email=$_POST['email'];
$subject=$_POST['zadeva'];
$txt=$_POST['sporocilo'];
$to = "mitja.celec12@gmail.com";
$headers = "From: ".$ime." <".$email.">" . "\r\n" .
"Reply-To: " .$email . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to,$subject,$txt,$headers);