[thelist] All emails from php are from nobody

Jeremy Ashcraft ashcraft at 13monkeys.com
Sun Oct 22 15:18:08 CDT 2000


You can specify a From:  address in the arguments you pass to the mail)
function. The PHP Manual specifies the mail function to take the arguments:

mail(string to, string subject, string message[, string Addt'l Headers])

so there is an optional argument at the end to pass additional headers.  So,
you could use

mail("someone at somedomain.com","Mail Subject","Mail message","From:
you at yourdomain.com\nReply-To: you at yourdomain.com\n");

HTH

jeremy

CDitty wrote:

> I recently moved from a BSD server to a Linux server and now all my emails
> that are php generated are sent from "nobody".  Can anyone offer a
> suggestion as to how to fix this?  The php mail code hasn't changed and
> worked find before.
>
> I think it might be something with apache or sendmail.  Any ideas?
>
> Thanks
>
> CDitty
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list