Page 1 of 1

mail() function not working

Posted: Mon Nov 03, 2003 7:05 am
by Jim_cliff11
Hi all i have a very big problem with the function mail()

If you try signing upto http://www.briskfire.com/newsite/join_form.html
It says the email has been sent but you never get it.

Ive tried changing the setup of mail function in php.ini in my
/usr/local/lib/ directory. Ive set it to my sendmail binary:-
/usr/sbin/sendmail -t -i but still nothing. Ive tried it without the -t -i variables and it dont work. The code is definatly right but its just not working. Ive tried setting the SMTP options and ive set my from address, but still nothing, its really starting to annoy me. Could it be something to do with apache running as a normal users - should i set it to run as root?

Anyhelp would be greatly appriciated
thanks

Posted: Mon Nov 03, 2003 7:18 am
by qads
would't hurt to post the code.

Posted: Mon Nov 03, 2003 7:53 am
by Johnm
Apache should run under it's own user NOT as root. Creat a user called webserver or something like it for Apache to run as and adjust permissions as needed.


John M

Posted: Tue Nov 04, 2003 6:00 am
by Jim_cliff11
This is the code:-

mail($email_address, $subject, $message,
"From: MyDomain Webmaster<admin@mydomain.com>\n
X-Mailer: PHP/" . phpversion());


BUT thats not the problem ive tried even he simplest mail() functions and it sill dosnt work. Its DEFINATLY an error with the mail server or something in my php.ini. So if any one can solve this problem for me i would be greatful. Thanks