mail() problem on local testing

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
ThumbsUp
Forum Newbie
Posts: 4
Joined: Mon Feb 09, 2004 12:05 am

mail() problem on local testing

Post by ThumbsUp »

Hi all,

I can't seem to find anything relating to my particular problem, so I'll tack a chance and ask here. This seems to be a pretty active forum, so maybe I'll find an answer.

I have my WinXP system finaly setup so I can test locally and everything seems to work fine, except the mail() function doesn't seem to do anything at all. I get no errors at all, either in the script or from Windows. I just simply don't see any mail going out and I never receive the email that should be sent back to me durring testing. The script works fine in the online version, so I've tried to duplicate that environment locally, for testing purposes. I've double checked my phpinfo() both locally and online, and besides the fact that their PHP Server API is CGI and my local copy is Apache and they're on a Linux system where I'm on a Windows system, I don't see any major differences in the PHP.ini settings.

Is there something I can configure locally to force an email to actually be sent instead of going off into cyberland never to be heard from again? I should mention too, the local copy of the web is a subweb under localhost. The online version is a subweb under a domain. My local copy of phpinfo() says "Internal Sendmail Support for Windwos = enabled"


Here's my setup:

WinXP Pro (all updates and patches)
FP2002 w/2002 server extentions
Apache v1.3.29 (Win32)
PHP v4.3.4
MySQL v4.0.17
phpMyAdmin v2.5.5-pl1

Web is published using FP to c:\web\www\subwebname which is served by Apache. Everything works fine, except mail(). What am I overlooking?

TIA,
Thumbs
User avatar
Dr Evil
Forum Contributor
Posts: 184
Joined: Wed Jan 14, 2004 9:56 am
Location: Switzerland

Post by Dr Evil »

you'll have to make changes to your php.ini (should be inside c:\windows) file.
find this:
SMTP = smtp.server.com ; for win32 only
sendmail_from = me@myaddress.com ; for win32 only
;sendmail_path = ;for unix only, may supply arguments as well ; (default is sendmail -t)
This specifies where you send the mails from and by default it is "localhost". You need a smtp server running to be able to send mails out. You can also configure it to connect to another server if you have posting rights.
ThumbsUp
Forum Newbie
Posts: 4
Joined: Mon Feb 09, 2004 12:05 am

Post by ThumbsUp »

Thanks Dr.

That did the trick. I can't believe it was that simple. Everything I read told me to leave it set to localhost so the Win32 system would kick in and take over the sending. It was SUPPOSED to be automatic. I should know better by now. :oops:

Thumbs
Post Reply