I have PHP 5.5.9 on Ubuntu 14.04.3 LTS. I use sSMTP and Google's SMTP to send mails on PHP's mail() function. Something has changed, because now when I recieve the email from server, sender is www-data, even tho I have specified headers for email as shown below
$headers = "MIME-Version: 1.0\r\n";
$headers .= "From: Site Webmaster <noreply@myserver.com> \r\n";
$headers .= "To: ".$email."\r\n";
$headers .= "Content-Type: multipart/alternative;boundary=" . $boundary . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
mail('', $subject, $message, $headers) or die(var_dump(error_get_last()));
It works otherwise, but as I sad, sender is shown as www-data
I'v tried to add lines to revaliases on sSMTP, and I have
FromLineOverride=YES
in ssmtp.conf, but it still doesn't work