Re: Add BCC parameter to mail()
| From: | Ashley Sheridan | Date: | Mon, 06 Jul 2009 05:50:55 +0000 |
| Subject: | Re: Add BCC parameter to mail() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294916@lists.php.net to get a copy of this message | ||
On Sun, 2009-07-05 at 18:55 -0700, cool@hosting4days.com wrote:
> Hi folks - Newbie question...
>
> Q: Is there a way to add BCC and/or CC parameters to this simple email
> function?
>
> If there is a better way to do this - please let me know....
>
> Thanks in advance....
>
>
> <?php
> $Name = "test"; //senders name
> $email = "test@test.com"; //senders e-mail adress
> $recipientname = "test";
> $recipient = "joe@test.com"; //recipient
> $mail_body = "test";
> $subject = "test";
> $header = "From: ". $Name . " <" . $email . ">\r\n";
> //optional
> headerfields
>
> $fullto = $recipientname . " <" . $recipient . ">";
>
> ini_set('sendmail_from', 'test@test.com');
>
> mail($fullto, $subject, $mail_body, $header); //mail command :)
> ?>
>
>
> Thanks,
> cool@hosting4days.com
>
>
>
rtfm http://uk3.php.net/manual/en/function.mail.php
Thanks
Ash
www.ashleysheridan.co.uk