Re: FN-FORUM: PHP mail
date posted 8th January 2007 13:55
On Mon, Jan 08, 2007 at 02:36:48PM -0000, Paul Cooper wrote:
>
> Hi
>
> I've got a site that was sending out emails fine till a couple of days
> ago. It is now sending out emails with ... (unknown sender). I don't
> really know PHP but is there a way to define the sender's name. I have
>
> $headers .= "From: ".$email."\n";
>
> in the script to define the fom email,but nothing for the from name.
Look at the 5th argument of main():
http://www.php.net/manual/en/function.mail.php
In addition your MTA needs to trust the user that the PHP scripts run as.
With exim you add this to the config file:
trusted_users = apache
What MTA are you using ?
--
Alain Williams
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256 http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include