CharSet = "utf-8";
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Username = _SMTP_USER_NAME;
$mail->Password = _SMTP_PASSWORD;
$mail->Host = _SMTP_HOST_NAME;
$mail->Port = _SMTP_PORT;
$mail->LE = "\r\n";
$mail->setFrom('from_email@yourdomain.com', 'Your Name');
$mail->AddAddress('to_email@domain.com', 'to_name optional'); // name is optional
$mail->AddAddress('to_email_1@domain.com'); // for multiple recipient
$mail->addCC('cc_email@domain.com');
$mail->addBCC('bcc_email@example.com');
$mail->Subject = 'Test Subject';
$mail->IsHTML(true);
$mail->Body = 'Your HTML Or Non-HTML body message';
if ($mail->send()) {
echo "Message sent!";
} else {
echo "Error: " . $mail->ErrorInfo;
}
?>