View Full Version : from

Creative Insanity
12-27-2005, 06:59 PM
Ok.. little thing I have never been able to suss out with php mail responders.

On my site I have order forms which when submitted send the order to the database which are viewed in the admin panel and then a email responder telling me something has been added, but in the email responder I have never been able to get the 'from' field in the email client to say anything other than Nobody, yes it actually says 'Nobody'.
Is there a way I can get this to put something other than the default?
Because I have so many responders on my site I want to know from what section they are coming from.

anyhoo, here is my little responder (email address omitted).

$subject = 'New Site Order';
$comments = 'New site order has been placed';
$foot = 'Webthings';

mail("my_email_addy", "$subject", "$comments", "$foot");

I have tried $from also and no joy.. so how can I get this to add something to the from field in the email client other than 'Nobody'.?

Creative Insanity
12-28-2005, 09:13 AM
Here I go answering my own question.
After reading some php books I found soimething interesting that works a treat. $headers.

$headers = 'From: webmaster@example.com' . "\r\n";
simple when you sit down and think about it.

12-28-2005, 10:31 AM
i was just going to post that

Creative Insanity
12-28-2005, 06:43 PM
hehe, we must of been looking at the same book dj.