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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -