WordPress Alibaba Cloud virtual host sending email configuration

This configuration is tested on wordpress 4.9.4. The
first step:
first, you need to enter the Alibaba Cloud virtual host console to modify the php.ini configuration file, and enable a function
PHP function fsockopen Settings: enable the
second step to modify the configuration file:
/wp-include /class-smtp.php
find the following code:
$this->smtp_conn = @stream_socket_client(
$host . ":" . $port,
$errno,
$errstr,
$timeout,
STREAM_CLIENT_CONNECT,
$socket_context
);
replace with
$this-> smtp_conn = @fsockopen($host,$port,$errno,$errstr,$timeout);
Step 3:
Use Easy Wp SMTP such as SMTP plug-in to send mail, it is generally enough to configure it.
Special Note: Since this method directly modifies the core code of WordPress, once the WordPress version is upgraded, it needs to be modified again, please remember! ! !
After the above steps are completed, you
need to configure parameters
1. First use QQ mailbox to send mail
core configuration parameters
SMTP Host: smtp.qq.com
SMTP Port: 465
SMTP Username: [email protected]
SMTP Password: XXXXXXXXXX (note that the password is the authorization code to enable the smtp function) The
above configuration is basically no problem.
2. Use Alibaba Cloud Enterprise Email to send emails

"Wordpress Aliyun Virtual Host Send Email Configuration"
You can create a new administrator user host address in the corporate mailbox: smtp. Your domain name
, port number 465,
username and password are set by yourself. After the configuration is complete, you can send emails.

The main two steps are to modify the configuration file and open the fsockopen function

Original link: http://www.resumevitea.top/archives/154

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325858604&siteId=291194637