亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

點擊運行Class 'think\Route' was not found \vendor\topthink\think-captcha\src\helper.php

https://img1.sycdn.imooc.com//5c246f9b0001280f14760122.jpg

https://img1.sycdn.imooc.com//5c246fe6000171a802350439.jpg

spacer.gif

<?php
/**
?*
?* @authors yxq ([email protected])
?* @date??? 2018-12-14 16:15:05
?* @version $Id$
?*/

// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
$rootPath=dirname(__FILE__);
include($rootPath.'/PHPMailer-master\src\PHPMailer.php');
include($rootPath.'/PHPMailer-master\src\Exception.php');
include($rootPath.'/PHPMailer-master\src\OAuth.php');
include($rootPath.'/PHPMailer-master\src\POP3.php');
include($rootPath.'/PHPMailer-master\src\SMTP.php');
//Load Composer's autoloader
require $rootPath.'/vendor/autoload.php';

$mail = new PHPMailer(true);????????????????????????????? // Passing `true` enables exceptions
try {
??? //Server settings
??? $mail->SMTPDebug = 2;???????????????????????????????? // Enable verbose debug output
??? $mail->isSMTP();????????????????????????????????????? // Set mailer to use SMTP
??? $mail->Host = 'smtp.aliyun.com';? // Specify main and backup SMTP servers
??? $mail->SMTPAuth = true;?????????????????????????????? // Enable SMTP authentication
??? $mail->Username = '[email protected]';???????????????? // SMTP username
??? $mail->Password = '123456';?????????????????????????? // SMTP password
??? $mail->SMTPSecure = 'tls';?????????????????????????? // Enable TLS encryption, `ssl` also accepted
??? $mail->Port = 587;
??? $mail->CharSet='UTF-8';??? ?
??? $mail->SMTPDebug = 4;????????? ?
????? // TCP port to connect to

??? //Recipients
??? $mail->setFrom('[email protected]', 'Mailer2');
??? $mail->addAddress('[email protected]', 'Joe User2');???? // Add a recipient
??? // $mail->addAddress('[email protected]');?????????????? // Name is optional
??? $mail->addReplyTo('[email protected]', 'Information2');
??? // $mail->addCC('[email protected]');
??? // $mail->addBCC('[email protected]');

??? //Attachments
??? // $mail->addAttachment('/var/tmp/file.tar.gz');???????? // Add attachments
??? // $mail->addAttachment('/tmp/image.jpg', 'new.jpg');??? // Optional name

??? //Content
??? $mail->isHTML(true);????????????????????????????????? // Set email format to HTML
??? $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';

??? $mail->send();
??? echo 'Message has been sent';
} catch (Exception $e) {
??? echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
}



正在回答

舉報

0/150
提交
取消

點擊運行Class 'think\Route' was not found \vendor\topthink\think-captcha\src\helper.php

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號