Re: mail() again...
| From: | Manuel Lemos | Date: | Mon, 02 Sep 2002 11:53:00 +0000 |
| Subject: | Re: mail() again... | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-114910@lists.php.net to get a copy of this message | ||
Hello,
On 09/02/2002 07:59 AM, :B Nerdy wrote:
what is recommended to use instead of mail() then?It depends on what is your problem. In most cases mail will do taking some care that may be platform dependent like the header line break issues that have to be \r\n under Windows but under Unix with sendmail or wrappers you'd better use \n . Anyway, if you use the class I mentioned you will be able to choose exactly the transport method that suits better your needs and platform constraints. In your case, maybe using the sendmail sub-class will give you enough control because it lets you call sendmail program wherever it is in your disk passing any command line switches to better control its operation without depending on any php.ini (except for safe mode that has to be off). Manuel Lemos
cheers "Manuel Lemos" <mlemos@acm.org> wrote in message news:20020901055229.64301.qmail@pb1.pair.com...-- Regards, Manuel LemosHello, On 09/01/2002 02:30 AM, Liam Mackenzie wrote:becauseIt seems nearly everyone has a problem with this function, probablyPOP3/SMTPit 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 havetellserver running on the same machine (eXtremail) I'm starting Sendmail like this: /usr/lib/sendmail -q1h When I do this: $this = mail("nig@nudenurd.com", "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 tobut Ime 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,thatget this in my syslog... Sep 1 15:28:01 nudenurd sendmail[19146]: g815S1fW019146: from=nobody, size=63, class=0, nrcpts=1, msgid=<200209010528.g815S1fW019146@nudenurd.nudenurd.com>, relay=nobody@localhostIt 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 MTAWORKS 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