1
我有一個簡單的郵件發佈腳本與Phpmailer碩士,我從github下載。致命的錯誤:調用未定義的方法PHPMailer :: IsSMTP()在/路徑/在線39
我在腳本上有一個致命錯誤。但我找不到解決方案。我GOOGLE了,但我沒有找到這個錯誤的任何來源。
我的腳本看起來像這樣;
<?php require_once("ayarlar.php"); ?>
<?php
if(($_POST["kullanici"]==$kullanici)and(isset($_POST))) // Authetnticating Admin E-Mail Address
{
/* Şifremi Unuttum Mail Gövdesi */
$ad="Company Name";
$mesaj ="
<style type='text/css'>
body{
font-family:'Verdana', Geneva, sans-serif;
font-size:10px;
}
table{
font-size:14px;
}
</style>
<h2>ADMIN PASSWORD</h2>
<hr>
<table style='width: 100%;'>
<tr style='width: 100%;'>
<td valign='middle' style='height:30px;width:50%;'>KULLANICI ADI: $kullanici</td>
</tr>
<tr style='width: 100%;'>
<td valign='middle' style='height:30px;width:50%;'>ŞİFRE: $parola</td>
</tr>
<tr style='width: 100%;'>
<td valign='middle' style='height:30px;width:50%;'>Lütfen Bu Epostayı Güvenli Bir Yerde Saklayın ve/veya Yazdırın</td>
</tr>
</table>";
/* Şifremi Unuttum Mail Gövdesi */
/* Php Mailer Class Mail Göndermek İçin */
require_once("../inc/phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->CharSet = "UTF-8";
$mail->AddAddress ("[email protected]","Company Name");
$mail->Subject = "ADMIN PASSWORD";
$mail->Body = "$mesaj";
$mail->Port = 26;
$mail->IsSMTP();
$mail->Host = "mail.example.com";
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "password";
$mail->IsHTML(true);
$mail->From = $kullanici;
$mail->FromName = $ad;
$mail->Send();
/* Php Mailer Class Mail Göndermek İçin */
echo "<script>
alert('Şifreniz Başarılı Bir Şekilde Eposta Adresinize Ulaştırılmıştır');
window.location.href='http://www.example.com/admin-password';
</script>";
}
else
{
echo "<script>
alert('Hatalı Eposta Adresi');
window.location.href='javascript:history.back()';
</script>";
exit();
}
?>
,我得到了以下錯誤:
致命錯誤:調用未定義的方法的PHPMailer :: IsSMTP()在/路徑/上線39
第39行:$ MAIL-> IsSMTP( );
有什麼建議嗎? 感謝您的幫助。