PHP mail() ; www-data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
randomace55
Forum Newbie
Posts: 2
Joined: Sun Mar 16, 2014 4:49 pm

PHP mail() ; www-data

Post by randomace55 »

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:

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);
I know that this is nost secure but first i just wanna make it work,ty for help.
randomace55
Forum Newbie
Posts: 2
Joined: Sun Mar 16, 2014 4:49 pm

Re: PHP mail() ; www-data

Post by randomace55 »

I still need solution,anyone?
Post Reply