Hello, On 09/01/2002 02:30 AM, Liam Mackenzie wrote: > It seems nearly everyone has a problem with this function, probably because > it relies on third party software.
Yes, mail() is probably the most problematic of the frequently used functions of PHP. That can be for many reasons like the need for manual configuration of PHP, useless/meaningless or non-existing error messages produced by mail(), inconsistent documentation of mail() in PHP manual, installation problems of the MTA, configuration problems of the user networks, anti-spam measures, etc... The main difficulty is that it takes a lot of expertise to figure out which of these problems are affecting you. > It doesn't work. That's my problem! > I'm using Sendmail as my MTA, not running as a Daemon as I have POP3/SMTP > server running on the same > machine (eXtremail) > I'm starting Sendmail like this: > /usr/lib/sendmail -q1h > > When I do this: > $this = mail("[EMAIL PROTECTED]", "Subject", "Message goes here"); > echo $this; > > The scripts hangs, and eventually my browser times out. > Is there any way I can get some error messages? Or at least get it to tell > me what on earth it's doing? Adding -v to the configuration of sendmail in php.ini may provide you a clue. Anyway, my guess is that your machine may not have a reverse DNS address. What is its IP? > There's nothing in any of my Apache logs, nothing in eXtremail's logs, but I > get this in my syslog... > > Sep 1 15:28:01 nudenurd sendmail: g815S1fW019146: from=nobody, > size=63, class=0, nrcpts=1, > msgid=<[EMAIL PROTECTED]>, > relay=nobody@localhost It seems you are missing seting th return-path. Use mail() 5th argument. > Anyone got any ideas? Anyone know if there's any docs on this kind of > thing? I looked, I failed... > Or where I can get some information on where to get an alternate MTA that > WORKS out of the box (or tar.gz) If all else fails, you may want to try this PHP class, with several variants that let you send messages by several methods besides mail(), like: using sendmail directly, using qmail-inject or even relay on specific SMTP server or even the most drastic measure that is to send messages directly to the receipient SMTP server. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php