惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Register - Security
The Register - Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
L
LangChain Blog
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
Security @ Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
人人都是产品经理
人人都是产品经理
H
Hacker News: Front Page
L
Lohrmann on Cybersecurity
T
Troy Hunt's Blog
T
Threat Research - Cisco Blogs
A
About on SuperTechFans
T
Threatpost
AWS News Blog
AWS News Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
T
Tor Project blog
Google Online Security Blog
Google Online Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tenable Blog
W
WeLiveSecurity
博客园 - 叶小钗
K
Kaspersky official blog
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
M
MIT News - Artificial intelligence
Hacker News - Newest:
Hacker News - Newest: "LLM"
Engineering at Meta
Engineering at Meta
有赞技术团队
有赞技术团队
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
小众软件
小众软件
D
Docker
爱范儿
爱范儿
C
Cyber Attacks, Cyber Crime and Cyber Security
N
News and Events Feed by Topic
S
Schneier on Security
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net

手里有只毛毛虫

PHP 利用ImageMagick实现多页PDF转一张图片 语言的艺术:一本正经胡说八道 白嫖阿里云免费PG数据库 上手:五块钱的目村眼镜 转载:MEOW MEOW? 2025 年度AI工具推荐 包含链接地址 如何识别哪些是 AI 生成的内容 关闭 n8n 的匿名遥测数据 - 手里有只毛毛虫 为 Automate 自动化接入豆包ai 识别图形验证码 - 手里有只毛毛虫
WordPress 6.9 更新后 SMTP 邮件发送失效解决办法
毛毛虫 · 2025-12-05 · via 手里有只毛毛虫

在 WordPress 6.9 版本之前,简单配置SMTP服务是这样的。

以QQ邮箱代发为例:

add_action('phpmailer_init', function ($phpmailer) {
    $phpmailer->FromName = '手里有只毛毛虫'; //发件人名称
    $phpmailer->Host = 'smtp.qq.com';
    $phpmailer->Port = '465';
    $phpmailer->Username = '[email protected]'; //发件人邮箱
    $phpmailer->Password = 'Password'; //发件人密码
    $phpmailer->From = '[email protected]'; //发件人邮箱
    $phpmailer->SMTPAuth = true;
    $phpmailer->SMTPSecure = 'ssl';
    $phpmailer->IsSMTP();
});

而6.9版本对 wp_mail() 函数进行了改动,变成扩展的方式设置发送地址。

更新文档:Improved Email Handling and Inline Image Support

新版导致的错误:

[email protected] : MAIL FROM command failed,Mail from address must be same as authorization user. ,501, SMTP 服务器错误:MAIL FROM command failed 详情:Mail from address must be same as authorization user. SMTP 代码:501

要恢复正常,需要追加以下设置

add_filter('wp_mail_from', function () {
    return '[email protected]'; //发件人邮箱
});