Re: Mail fifth parameter
| From: | Raditha Dissanayake | Date: | Sun, 07 Mar 2004 14:17:56 +0000 |
| Subject: | Re: Mail fifth parameter | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-179695@lists.php.net to get a copy of this message | ||
Hi,
I am no expert on sendmail configuration but my little knowledge tells me sendmail shouldn't change any headers that are passed to it if it is configured properly.
joel boonstra wrote:
On Sun, Mar 07, 2004 at 09:51:28AM +0600, Raditha Dissanayake wrote:-- Raditha Dissanayake. ----------------------------------------------------------------------- http://www.radinks.net/ftp/applet/ An applet that breaks all the rules. Reads, Writes and Deletes files on your hard disk. Uploads what's left to a third party server.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