linux - How does PHP choose what email address it sends from? -



linux - How does PHP choose what email address it sends from? -

i noticed odd while doing testing on someone's development server. using very simple mail service test...

mail('iamnotsharingmy@email.com', 'test subject', 'test message');

...on receipt, sender root@ , other times sender www-data@.

what causes change, seemingly, randomly?

yes, know sender can set in headers, curious causes default behavior.

server information

ubuntu server 12.04 apache/2.2.22 php version 5.3.10-1ubuntu3.7

in response barmar's comment

echo exec('whoami'); returns www-data user web server running under.

so, cause scripts run root instead of web server user?

php linux apache email webserver

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -