Sending E-Mail Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
sroussie
Forum Newbie
Posts: 19
Joined: Wed Aug 27, 2003 12:26 pm
Location: Buffalo, NY

Sending E-Mail Problem

Post by sroussie »

Hi,

I recently set up a basic contact form for a website. I tested it on my server at home, WIN 2000 and PHP, and it works fine. I get the e-mail. I have uploaded it to their server, UNIX, and while I get the response page after I submit the form, I never recieve the e-mail. The php.ini file shows the following:

sendmail_from = no value
sendmail_path = /usr/sbin/sendmail -t -i

I also changed permission on the php file after it was uploaded. It seems like it should work. Am I missing something?

Thanks,
Sue
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

The first thing i'd check is the mail log, i'll presume you have access to do this ;)
Something like 'tail -10f /var/log/mail.log' then run your script and watch for any output in the log. If there's is output it should tell you what's wrong, if not then it's not getting that far and it's probably a permissions problem.

A way to test is to 'su - nobody' (or whoever apache runs as) and do
/usr/sbin/sendmail -t -i < somemailfile.txt
where somemailfile.txt is a valid email text file with all the email headers etc..

Good luck.
User avatar
sroussie
Forum Newbie
Posts: 19
Joined: Wed Aug 27, 2003 12:26 pm
Location: Buffalo, NY

Post by sroussie »

Thanks, I'll give it a shot.
Post Reply