PHP mail issue with www-data

后端 未结 6 700
野趣味
野趣味 2020-12-08 10:34

I am trying to invoke sendmail via PHP\'s mail function by the following code:

$to      = \'blah@email.state.edu\';
    $subject = \'test\';
    $message = \         


        
6条回答
  •  遥遥无期
    2020-12-08 11:14

    Although this is an old question, I'm adding this answer in case it is of help to someone:

    I had the same problem with the From: header being re-written to www-data@host... I eventually tracked it down to the ssmtp bridge service that was piping mail from our web server into our mailserver. I added the line FromLineOverride=YES in the file /etc/ssmtp/ssmtp.conf and the problem disappeared.

提交回复
热议问题