ISPConfig, PHP mail() problem

Discussion in 'Server Operation' started by tbakerisageek, Jul 17, 2006.

  1. tbakerisageek

    tbakerisageek New Member

    Hey folks,
    I am runninng Ubuntu 5.10, ISPConfig perfect setup as followed at My issue is when I run a php script containing "mail(, "mail from contact form", $body, $headers),

    My $headers ='"From: '.$txtEmailAddress.'"'(Single,Double,Single Quotes) = "From:" In my headers sent to the email address I see my From: but before that is added as headers, "From: (www-data)
    " is run as a header first. Resulting in all my email being sent from script coming from www-data. I plan to use this for more than just emailing myself. How do I disable this functionaliy, and make it so I can specify with my $headers, what address it "comes from"??

    Thanks for the help in advance.
    Last edited: Jul 17, 2006
  2. tbakerisageek

    tbakerisageek New Member

    After more testing, tweaking, and general playing around... I figured it out.

    looking through the headers lead me to the problem. The original headers "www-data" were not quoted. I modified my code to not quote my $headers string and it came through correctly. It looks like if you specify new headers for any message, the LAST Specified headers are read and used by mail clients (outlook 2003 in my case)

Share This Page