目前很多虚拟主机基本都是禁用了mail函数的,所以我们只能使用SMTP服务发送邮件,网上关于STMP的WordPress插件有很多,将下面代码修改后复制到functions.php文件,再测试发送邮件功能。
//WordPress免插件配置SMTP邮件
function mail_smtp( $phpmailer )
{
$phpmailer->FromName = \’生存无忧\’; //发件人名称
$phpmailer->Host = \’smtp.qq.com\’; //修改为你使用的邮箱SMTP服务器
$phpmailer->Port = 465; //SMTP端口
$phpmailer->Username = \’k1510@qq.com\’; //邮箱账户
$phpmailer->Password = \’*****\’; //邮箱授权码(此处填写QQ邮箱生成的授权码)
$phpmailer->From = \’k1510@qq.com\’; //邮箱账户
$phpmailer->SMTPAuth = true;
$phpmailer->SMTPSecure = \’ssl\’; //tls or ssl (port=25时->留空,465时->ssl)
$phpmailer->IsSMTP();
}
add_action(\’phpmailer_init\’, \’mail_smtp\’);
I drop a leave a response each time I appreciate a poist on a site or if I
have somethihg to add to the discussion. It’s a result of the passion communicated
in the post I read. And on this article WordPress纯代码免插件配置SMTP邮件功能 –
绿站. I was actually moved enough to drop a comment 😉 I
do have 2 questions for you if it’s allright. Is it just mee or do some of theese responses come across as if they are coming from
brain dead visitors? 😛 And, if you are posting
at additional social sites, I would like to fokllow you.
Woild you list the complete urls of all your community
pages like your Facebook page, twitter feed, or linkedin profile? https://Menbehealth.wordpress.com/
vm9u1b
esl2ms
m9mhzu
As I website possessor I conceive the subject matter here is really fantastic, thanks for your efforts.
Heya i’m for the first time here. I found this board and I find It really useful & it helped me out a lot. I hope to give one thing back and aid others such as you aided me.
https://www.droversointeru.com