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请在保留重复问题前检查问题 –