返回首页

我需要从我的网站通过PHP邮寄一些数据的功能,所以我想一个例子,知道如何。但它不能正常工作。因为它需要验证我使用phpmailer,但它不能正常工作。
这是代码。

<?require("path\phpmailer.php");

$mail = new PHPMailer(); 

$mail->IsSMTP();

$mail->Host = "smtp.example.com";

$mail->SMTPAuth = true;

$mail->Username = "usernamexxx";

$mail->Password = "password"; 

$mail->From = "xxxxxx@example.com";

$mail->FromName = "Name";

$mail->AddReplyTo("name@example.com");$mail->AddAddress("name@example.com");

$mail->IsHTML(true);$mail->Subject = "Test message sent using the PHPMailer component";

$mail->Body = "This is a test message.";$mail->Send();

?>

这是错误的:

{C} 请帮
[编辑]删除的紧迫性 - OriginalGriff [/编辑]:adnama

回答

评论会员: 时间:2