当前位置:网站首页>Phpmailer reported an error: SMTP error: failed to connect to server: (0)
Phpmailer reported an error: SMTP error: failed to connect to server: (0)
2022-07-05 03:57:00 【Summer is already slightly cool】
One 、 explain
- According to this article PHPMailer Use , Configured with
$mail->Username,$mail->Passwordafter , The execution error is as follows :
2021-09-01 12:22:37 SMTP ERROR: Failed to connect to server: (0)
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Error
Two 、 solve
1、 Ignore ssl authentication ( My is for this reason )
- stay
$mail = new PHPMailer();Add the following code after
// Instantiation PHPMailer Core class
$mail = new PHPMailer();
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
...
2、 Set the port to bit 25 , Don't use SSL,465( Other possible reasons )
- hold
// Set to use ssl Encrypted login authentication
$mail->SMTPSecure = 'ssl';
// Set up ssl Connect smtp The remote server port number of the server
$mail->Port = 465;
- Change it to
$mail->Port = 25;
3、 ... and 、 His shan zhishi
边栏推荐
- Google Chrome CSS will not update unless the cache is cleared - Google Chrome CSS doesn't update unless clear cache
- 深度学习——LSTM基础
- Interview byte, pass the exam and directly work on three sides. As a result, I found an architect to hang me?
- [charging station]_ Secular wisdom_ Philosophical wisdom _
- How rem is used
- Thread Basics
- NEW:Devart dotConnect ADO. NET
- ActiveReportsJS 3.1 VS ActiveReportsJS 3.0
- It took two nights to get Wu Enda's machine learning course certificate from Stanford University
- 面试字节,过关斩将直接干到 3 面,结果找了个架构师来吊打我?
猜你喜欢

25K 入职腾讯的那天,我特么哭了

error Couldn‘t find a package.json file in “你的路径“

Rust区块琏开发——签名加密与私钥公钥

EasyCVR平台出现WebRTC协议视频播放不了是什么原因?

ActiveReportsJS 3.1 VS ActiveReportsJS 3.0

Operation flow of UE4 DMX and grandma2 onpc 3.1.2.5
![[web source code code code audit method] audit skills and tools](/img/7c/2c26578da084b3cd15d8f252b0e132.png)
[web source code code code audit method] audit skills and tools

NEW:Devart dotConnect ADO.NET

Clickhouse materialized view

Official announcement! The third cloud native programming challenge is officially launched!
随机推荐
Blue Bridge Cup single chip microcomputer -- PWM pulse width modulation
DECLARE_ WAIT_ QUEUE_ HEAD、wake_ up_ Interruptible macro analysis
[安洵杯 2019]不是文件上传
UI自動化測試從此告別手動下載瀏覽器驅動
As soon as I write the code, President Wang talks with me about the pattern all day
[brush questions] BFS topic selection
[C language] address book - dynamic and static implementation
汇编-入门
已解决(sqlalchemy+pandas.read_sql)AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
输入的查询SQL语句,是如何执行的?
UE4 DMX和grandMA2 onPC 3.1.2.5的操作流程
英语必备词汇3400
[array]566 Reshape the matrix - simple
[learning notes] month end operation -gr/ir reorganization
EasyCVR更改录像存储路径,不生成录像文件如何解决?
@Transactional 注解导致跨库查询失效的问题
Official announcement! The third cloud native programming challenge is officially launched!
Google Chrome CSS will not update unless the cache is cleared - Google Chrome CSS doesn't update unless clear cache
Plasticscm enterprise crack
Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery