1. 修改wp-includes下的pluggable.php $phpmailer-IsMail(); 改为 $phpmailer-IsSMTP(); 2. 修改wp-includes目录下的class-phpmailer.php下面这些条目 var $Mailer = 'smtp'; var $Host = 'your smtp server'; var $Port = 25; var $SMTPSecure = ; var $SMT
1. 修改wp-includes下的pluggable.php
$phpmailer->IsMail();
改为
$phpmailer->IsSMTP();
2. 修改wp-includes目录下的class-phpmailer.php下面这些条目
var $Mailer = 'smtp';
var $Host = 'your smtp server';
var $Port = 25;
var $SMTPSecure = "";
var $SMTPAuth = true;
var $Username = 'your mail account';
var $Password = 'your mail password';
除此以外, 需要注意的是, 如果机器上有安装杀毒软件, 如McAfee, 会将php-cgi.exe认定为蠕虫病毒, 因此需要修改保护规则:
以上方法实际上是通过Socket连接SMTP服务器发送邮件(验证方式), 如果是在IIS+PHP+Discuz主机上, 对于邮件设置有图形化的网页设置页面, 操作要方便很多.
注: 如果不使用验证方式(即使用匿名SMTP发送邮件), 可以发送内部邮件, 但不能发送外部邮件, 故障原因出在发送邮件时未能通过IIS的SMTP服务器密码验证.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Linux new version
SublimeText3 Linux latest version