Page 1 of 1

Errors, php.ini, SMTP questions

Posted: Tue Mar 09, 2004 3:31 pm
by toni
Hello,

I have put together a simple 404 error page that e-mails the site that was requested and the page referrer. The page works great on one of our sites but I'm having some trouble on the other one. The second site is on a different server and I had to change the SMTP setting in php.ini.

For some reason, when I try the mail() function on a page on that site - No e-mail is sent (I added a conditional - IF (mail($address, $subject, $message)) {print("Success");} - so that I could tell when it sent). Unfortunately I'm not getting errors, so I'm having trouble diagnosing the problem.

"errors_display" is currently set to off - would that be the best place to start?
I'm still new at this, so thank you for your patience.

Toni

Posted: Tue Mar 09, 2004 3:35 pm
by infolock
do a phpinfo and see if imap is installed.

the extensions for email may not be properly installed on your web server, or your email server you are trying to use is not correctly configured on the server or in your script.

had the same problem a few months ago :P

Posted: Tue Mar 09, 2004 4:37 pm
by toni
Thanks, that may be the problem. Do you know where I could find instructions on how to install that module?

Posted: Tue Mar 09, 2004 4:44 pm
by markl999
Might be worth first checking the mail log on the server, if it's getting that far it should highlight the problem.
What is this server running btw, *nix, windows etc ? I'm guessing windows as you mention 'SMTP in php.ini' ?

Posted: Tue Mar 09, 2004 4:49 pm
by toni
I did check the mail log and couldn't find any indications that it was even trying to e-mail.

Running on Windows 2000

Posted: Tue Mar 09, 2004 4:52 pm
by ol4pr0
What do you have in youre SMTP setting?

Dont wanna sound like a wise guy however.. it might have something wrong

Posted: Tue Mar 09, 2004 5:39 pm
by toni
I have an internal IP address in the SMTP setting

Posted: Tue Mar 09, 2004 10:30 pm
by infolock
http://www.php.net/imap is about the best place to start for configuring smtp/imap. not that hard long as you have a mail server.. btw, did you check PHPINFO to see if it was an installed service already??

Posted: Wed Mar 10, 2004 8:18 am
by toni
Yes, I checked and couldn't find anything regarding IMAP in the PHPINFO.
Thanks for the link.

Posted: Wed Mar 10, 2004 5:06 pm
by infolock
np, glad to have helped.