amazon send smtp php bcc addaddress
<?php
require("class.phpmailer.php");
require("class.smtp.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "mail.davidokwii.com"; // specify SMTP serve
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "[email protected]"; // SMTP username
$mail->Password = "my-password"; // SMTP password
$mail->From = "[email protected]"; //From Address
$mail->addCc('[email protected],'Test Okwii'); //Cc address
$mail->addBcc('[email protected]','Test OKwii'); //Bcc address
$mail->FromName = "PHP SMTP Test";
$mail->AddAddress("[email protected]", "David Test"); //To Address
$mail->AddReplyTo("[email protected]", "David Test"); //Reply-To Address
$mail->Port = "25"; // SMTP Port
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(false); // set email format to HTML
$mail->Subject = "Sending a test email";
$body="
Hello,
This is a test email
";
$mail->MsgHTML($body);
if(!$mail->Send()){
echo "Mailer Error: " . $mail->ErrorInfo;
}
echo $body;
?>