本文作者:StubbornHuang
版权声明:本文为站长原创文章,如果转载请注明原文链接!
原文标题:WordPress – 发送邮件很慢的解决办法
原文链接:https://www.stubbornhuang.com/2105/
发布于:2022年04月21日 17:06:06
修改于:2022年04月21日 17:06:29

1 发送邮件很慢的解决办法
WordPress使用smtp方式(使用的是qq的smtp服务器)测试发送邮件没有问题,但是发送邮件的速度很慢。估计是sendmail函数发送邮件慢的问题了。
此时先查看本机host名称,使用命令:
hostname
查询的结果为:
safe-win-1.localdomain
然后使用以下命令输出host看host文件内容:
cat /etc/hosts
查到的host文件内容如下:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
因为sendmail监听的是127.0.0.1,但却无法确认主机名safe-win-1.localdomain,所以发送邮件就比较慢了,所以就把safe-win-1.localdomain这个主机名加到host文件里面去,修改后的文件内容如下:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 safe-win-1.localdomain
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 safe-win-1.localdomain
有的人说 还需要重启sendmail服务:service sendmail restart,实际上不是必须的。
当前分类随机文章推荐
- WordPress - get_header函数,加载主题头部header模板 阅读157次,点赞0次
- WordPress - home_url()函数,获取网站主页url链接 阅读160次,点赞0次
- WordPress - Windows使用PhpStudy本地部署WordPress 阅读2843次,点赞0次
- WordPress - 在浏览器的console输出信息 阅读2709次,点赞0次
- WordPress - 下载安装插件失败,无法创建目录 阅读3478次,点赞0次
- WordPress - $Post WP_Post对象的属性 阅读1441次,点赞0次
- WordPress - 使用插件的方式作出类似向主题function.php中添加代码的功能 阅读1838次,点赞0次
- WordPress - 增加百度统计代码 阅读2237次,点赞0次
- WordPress - 修改WP Editor.md markdown编辑器插件从剪切板粘贴图片上传的清晰度和质量 阅读90次,点赞0次
- WordPress - get_edit_post_link函数详解 阅读276次,点赞0次
全站随机文章推荐
- 客户端开发GUI框架对比与技术选型总结 阅读1636次,点赞0次
- WordPress - 插件WP Editor.md 在网站更换为https后无法正确加载 阅读3060次,点赞0次
- 资源分享 - Essential Mathematics for Games and Interactive Applications(Third Edition) 英文高清PDF下载 阅读1083次,点赞0次
- 资源分享 - 3D Graphics for Game Programming 英文高清PDF下载 阅读516次,点赞0次
- 资源分享 - Foundations of 3D computer graphics 英文高清PDF下载 阅读329次,点赞0次
- 资源分享 - Artificial Intelligence - A Modern Approach , Fourth Edition 英文高清PDF下载 阅读1266次,点赞0次
- 资源分享 - Computational Geometry - Algorithms and Applications, First Edition 英文高清PDF下载 阅读871次,点赞0次
- 资源分享 - OpenGL Shading Language (Third Edition) OpenGL橙宝书 英文高清PDF下载 阅读1078次,点赞0次
- 资源分享 - FFmpeg从入门到精通(刘岐赵文杰著)PDF下载 阅读11587次,点赞19次
- 资源分享 - Physics for Game Programmers 英文高清PDF下载 阅读1019次,点赞0次
全部评论:1条