使用 Mailx 通过 SMTP 在 Centos 上发送邮件,解决 WordPress 发送邮件问题

发布于:
更新时间:2021-08-25

我们提供 WordPress主题和插件定制开发服务

本站长期承接 WordPress主题、插件、基于 WooCommerce 的商店商城开发业务。 我们有 10 年WordPress开发经验,如果你想 用WordPress开发网站, 请联系微信: iwillhappy1314,或邮箱: amos@wpcio.com 咨询。

9 thoughts on “使用 Mailx 通过 SMTP 在 Centos 上发送邮件,解决 WordPress 发送邮件问题

  1. 执行这些命令后还是出现相同的错误:“Error in certificate: Peer’s certificate issuer is not recognized.”

    请问是怎么回事??

    1. 按照上面说的,执行了命令:
      mkdir -p /root/.certs/
      echo -n | openssl s_client -connect smtp.qq.com:465 | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ > ~/.certs/qq.crt
      certutil -A -n “GeoTrust SSL CA” -t “C,,” -d ~/.certs -i ~/.certs/qq.crt
      certutil -A -n “GeoTrust Global CA” -t “C,,” -d ~/.certs -i ~/.certs/qq.crt
      certutil -L -d /root/.certs

      邮件是能发了,但还是出错,相同的错误提示:“Error in certificate: Peer’s certificate issuer is not recognized.”

  2. 生成证书那儿少了一条,加上就可以了。

    certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu"  -d ./ -i qq.crt  #认证
    1. 执行完四条命令之后 cd 到 /root/.certs/ 目录
      然后执行
      certutil -A -n “GeoTrust SSL CA – G3” -t “Pu,Pu,Pu” -d ./ -i qq.crt
      被你坑了1个小时,因为你的语句中,G3前面的中划线是中文字符

      1. 这个锅不是 @枫叶 的,发的评论是对的,不知道为什么,被 WordPress 自动转码了。为了避免其他人被坑,我编辑了一下这条评论,加上了 pre。

  3. wordpress中不用设置吗?centos中通过命令都可以正常发送,但wordpress中就是不行。启用插件就可以了。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

*