Re: Getting the "From: admin@site.com" to work

From: Date: Sat, 26 Oct 2002 20:53:09 +0000
Subject: Re: Getting the "From: admin@site.com" to work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121550@lists.php.net to get a copy of this message
Andre Dubuc wrote: > Perhaps some kind guru can spare me some time. I've tried to get the "From: > xxxx" field pre-filled for a registration/confirmation email that I send out. To add to John's reply, here's how to do a multi-parameter Header. Also note the \r\n at the end of each of these lines. If you don't do this, the header won't be formatted properly. It took me some time to eventually figure this out when I first did this because I was using just \n which doesn't work in the header, but, does work in the body. $headers = "From: webmaster@yoursite.com\r\n" ."Reply-To: webmaster@yoursite.com\r\n" ."X-Mailer: PHP/4.0.2"; You can also add other mail headers such as 'Importance: High' to the headers list.

« previous php.general (#121550) next »