Answers
Sep 04, 2006 - 05:38 PM
"Bcc: copyme@example.com\r\n"
This should work from PHP 4.3 onwards.
Sep 05, 2006 - 07:36 AM
You will need to download the classes from http://phpmailer.sourceforge.net/ and then use some code like this :
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "smtp1.site.com;smtp2.site.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "jswan"; // SMTP username
$mail->Password = "secret"; // SMTP password
$mail->From = "from@email.com";
$mail->FromName = "Mailer";
$mail->AddAddress("josh@site.com","Josh Adams");
$mail->addBCC("joe@site.com","Joe Tailer");
$mail->Subject = "Here is the subject";
$mail->Body = "This is the body";
if(!$mail->Send())
{
echo "Message was not sent
";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
Sep 05, 2006 - 07:52 AM
Especially the phpmailer class makes things easier for me. Thanks for the example, redcharcoal.
Jun 23, 2008 - 10:56 PM
Add New Comment