hi
i need some about mail function..
ie,how can i send Bcc,Cc mails in php ueing mail()..
thanks in advance
Mail............
Moderator: General Moderators
-
mattpointblank
- Forum Contributor
- Posts: 304
- Joined: Tue Dec 23, 2008 6:29 am
Re: Mail............
Googling for about 20 seconds resulted in this:
Replace "Bcc: username@myisp.com\n"; with "CC: username@myisp.com\n" for CCs instead.
Code: Select all
<?php
// switch the value of $email to the
// persons email address you are sending
// this to.
$email = "username@myisp.com";
$subject = "Working PHP v4.0b4 mail script";
$body = "Um, looks good from here.";
$headers = "From: mymailer@mydomain.com\n";
$headers .= "Reply-to: noreply@mydomain.com\n";
$headers .= "Bcc: username@myisp.com\n";
$headers .= "Bcc: username@myisp.com\n";
$headers .= "Bcc: username@myisp.com\n";
$headers .= "Bcc: username@myisp.com\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
mail ($email, $subject, $body, $headers);
echo "schweeeeeet.....its workin'";
?>