第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

即使在包含 SMTP.php 之后,PHPMailer 也不會(huì)發(fā)送郵件

即使在包含 SMTP.php 之后,PHPMailer 也不會(huì)發(fā)送郵件

PHP
回首憶惘然 2023-06-18 16:23:01
出于某種奇怪的原因,我的 PHP 登錄系統(tǒng)會(huì)發(fā)送一封確認(rèn)電子郵件來激活您的帳戶,但它不會(huì)發(fā)送任何內(nèi)容。<?php$error = NULL;require "phpmailer/class.phpmailer.php";require "phpmailer/class.smtp.php";require "phpmailer/PHPMailerAutoload.php";if(isset($_POST['submit'])) {    //Form Data GET    $u = $_POST['u'];    $p = $_POST['p'];    $p2 = $_POST['p2'];    $e = $_POST['e'];    //Throw Username too short error    if(strlen($u) < 5){        $error = "(!) Your username must be at least 5 characters.";    }elseif($p2 != $p) {    //Throw password pair error.        $error .= "(!) Your passwords do not match :/";    }else{        //200 [OK]        //Establish Connection to Database        $mysqli = NEW MySQLi('localhost','root','','test');        //Convert special chars.        $u = $mysqli->real_escape_string($u);        $p = $mysqli->real_escape_string($p);        $p2 = $mysqli->real_escape_string($p2);        $e = $mysqli->real_escape_string($e);        //Generate Verification Key        $vkey = md5(time().$u);        //Insert account into database        $p = md5($p);        $insert = $mysqli->query("INSERT INTO accounts(username,password,email,vkey)            VALUES('$u','$p','$e','$vkey')");        if($insert){            //Start PHPMailer            $mail = new PHPMailer(true);            $mail->IsSMTP(); // telling the class to use SMTP            $mail->SMTPDebug = 0;   //No Debug. Set to 3 for verbose logging.            $mail->SMTPAuth = true; // enable SMTP authentication            $mail->SMTPSecure = "ssl"; //Set to SSL to pass checks.            $mail->Host = "smtp.mail.com"; //Set to mail.com server, it has ssl, smtp, and it's free. If you'd like to use gmail, use smtp.gmail.com            $mail->Port = 465;  //SSL/TLS Port for mail.com and gmail.com一開始,我需要我的 PHPMailer 文件夾中的文件,然后我啟動(dòng) PHPMailer這讓我很緊張。我知道問題所在。如果有人知道解決方案或知道為什么它不起作用的提示,那就太好了。謝謝。同一文件中的 HTML
查看完整描述

1 回答

?
阿波羅的戰(zhàn)車

TA貢獻(xiàn)1862條經(jīng)驗(yàn) 獲得超6個(gè)贊

你可以試試這個(gè)我也有一個(gè)錯(cuò)誤所以我不得不在主機(jī)之前添加這一行


$mail->SMTPOptions=array('ssl'=>array('verify_peer'=>false,'verify_peer_name'=>false,'allow_self_signed'=>false));

但如果這不起作用,您可以嘗試像這樣進(jìn)行故障排除


if($mail->Send()){ 




}else{ 


var_dump($mail);

die();


所以一旦你得到你的錯(cuò)誤日志,你可能可以做一個(gè)谷歌或粘貼你的錯(cuò)誤日志,也許我們可以提供幫助


查看完整回答
反對(duì) 回復(fù) 2023-06-18
  • 1 回答
  • 0 關(guān)注
  • 109 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)