Re: Mail fifth parameter

From: Date: Sun, 07 Mar 2004 06:09:09 +0000
Subject: Re: Mail fifth parameter
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-179684@lists.php.net to get a copy of this message
On Sun, Mar 07, 2004 at 09:51:28AM +0600, Raditha Dissanayake wrote: > It's an often overlooked fact that you can pass additional headers in > the fourth parameter. I do belive you should use \n and not \r\n > then your code will look like > > mail("user@example.com", "object", $message, > "From: webmaster@domain.com\n ". > "Reply-To:webmaster@domain.com\n". > "Return-Path: webmaster@$domain.com\n); As mentioned in another post, the Return-Path header can and usually is overwritten by sendmail when it does the actual sending. In addition to a previous suggestion, one way to reliably set that header is to use phpmailer (http://phpmailer.sourceforge.net/) which has the option of using an smtp server rather than sendmail directly. joel -- [ joel boonstra | gospelcom.net ]

« previous php.general (#179684) next »