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

2002-10-26 Thread John Nichel
Add this to the header string... "Bcc: [EMAIL PROTECTED]\r\n"; Andre Dubuc wrote: Perhaps some kind guru can spare me some time. I've tried to get the "From: " field pre-filled for a registration/confirmation email that I send out. I've managed to get the "To: ' field working great, but no

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

2002-10-26 Thread David McInnis
You need to build your header and include that in your mail() call: $lc_headers = "From: $lc_from_name <$lc_from_email>\n"; $lc_headers .= "X-Sender: <$lc_sender>\n"; $lc_headers .= "X-Mailer: PHP\n"; // mailer $lc_headers .= "Return-Path: <$lc_return>\n"; // Return path for errors $lc_hea

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

2002-10-26 Thread Andre Dubuc
Thanks John, I had the maual in front of me, but I didn't understand that you had to put the 'From:' stuff in a 'header'. That's why it wasn't working. I presumed (wrongly again) that 'headers' were optional, and I got sidetracked by the success of the "To:" field. Thanks for clearing that up.

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

2002-10-26 Thread John Nichel
http://www.php.net/manual/en/function.mail.php >>if(@mail($to, $from, $subject, $message)) There is no 'from' field. This must be put in the headers. Andre Dubuc wrote: Perhaps some kind guru can spare me some time. I've tried to get the "From: " field pre-filled for a registration/confi

RE: [PHP] Getting the "From: admin@site.com" to work

2002-10-26 Thread John W. Holmes
[snip] > if(@mail($to, $from, $subject, $message)) Go back to the manual. The parameters for mail are mail(to,subject,message,headers). You have to pass the From: address in the headers. $to = "[EMAIL PROTECTED]"; $subject = "Your email"; $message = "Your email is good"; $headers = "From: [EMAIL

[PHP] Getting the "From: admin@site.com" to work

2002-10-26 Thread Andre Dubuc
Perhaps some kind guru can spare me some time. I've tried to get the "From: " field pre-filled for a registration/confirmation email that I send out. I've managed to get the "To: ' field working great, but no matter where I stick the 'From:' code, it doesn't send the email. Any ideas what I'