0
GoDaddy的帳戶我開發一個PHP註冊頁面後,用戶註冊成功,他將得到感謝你從我的域名 郵件,但我想這個PHP代碼的電子郵件不發送 PHP腳本發送電子郵件從
$reg_query = mysqli_query($conn, "INSERT INTO `at_reg_user`(`fname`, `lname`, `email`, `password`, `mobile`, `class`, `ipaddress`) VALUES ('$fname','$lname','$email','$password1','$mobile','$class','$remote')");
if ($reg_query) {
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "mail.aenugulakarthik.in";
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "xxxxxxx";
$mail->From = "[email protected]";
$mail->FromName = "KarthikAenugula";
$mail->AddAddress($email);
$mail->AddReplyTo("[email protected]");
$mail->WordWrap = 50;
$mail->IsHTML(true);
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if ($mail->send())
{
echo("<SCRIPT LANGUAGE='JavaScript'>
window.alert(' Registration Successful')
</SCRIPT>");
} else {
echo("<SCRIPT LANGUAGE='JavaScript'>
window.alert(' Mail unsent')
</SCRIPT>");
}
重定向嘗試捕捉異常/調試 – webpic
嘗試使用PHP的'mail'功能http://stackoverflow.com/questions/1268012/phpmailer-v-mail後-for-a-simple-contact-form – julekgwa
@John Conde請在保留重複問題前檢查問題 –