WordPress User registration can not receive mail and other related issues to solve

Source: Internet
Author: User
Tags mail php file vps wordpress email

In order to increase WordPress's blog interactivity, some content may require visitors to sign up for login before viewing. WordPress Default Registration method is to obtain a random password in the form of mail and complete registration. However, when the test found that can not receive the registration information sent by the site, after the exclusion of the SMTP service is normal, is the issue of the sender, and is usually caused by the environmental configuration.

If you are using a Linux VPS, load the CentOS 6.4 system. WordPress New user registered mail sent by default is Phpmailer function to send, Linux server only need to enable SendMail services. If the service is not enabled for your own VPS, you can enable the service by using the following command:

/etc/init.d/sendmail start

If it is a Windows Server environment, it is recommended that you use the SMTP protocol to send message information. The specific methods are as follows

1. The/wp-includes/pluggable.php of this document will be

$phpmailer->ismail ();

Amended to

$phpmailer->issmtp ();

This means that the mail function is not used and is replaced with SMTP.

2. Modify/wp-includes/class-phpmailer.php The SMTP parameter (SMTP VARIABLES) in this file is:

var $Host = "SMTP.xxx.com"; You use an SMTP server, such as smtp.163.com.

var $SMTPAuth = True;

var $Username = "youname@xxx.com; e-Mail User name

var $Password = "*********"//e-mail password

How to modify the sender and email address:

Modify the pluggable.php file in the Wp-includes directory

There is also a way to directly in the Wp-includes directory under the pluggable.php file add the following code, you can try.

And then solve the problem of "generation by * * * * *". Continue searching for "wordpress@", Wordpress3.6 version on line 1057th:

$WP _email = ' me@ '. Preg_replace (' #^www.# ', ', ', Strtolower ($_server[' server_name '));

This behavior is the email address of the WordPress email generation. When you do not have the Web server's administrative authority, and do not want to let others see some unnecessary information, you can change the email here to their own.

If the sender of Chinese name, may be in the receiving email will be displayed garbled, and so on, this is due to file encoding, editing files using UTF-8 without a signature (UTF-8 no BOM format), it is recommended to use notepad++ for editing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.