Solution 1: Are you not configured?
In fact, it is very simple: log on to the background --> set --> discuss, and then set it according to the following figure (this is version 3.0.1, and other versions are similar ):
After setting up, you can send a comment or message to see if you can receive email notifications. If not, your host does not support sending emails.
So what should we do? Commenting on email notifications can be said to be a very important function of blogs. In fact, we had a solution for a long time, but we didn't know the children's shoes we just came into contact with wordpress.
Configure SMTPIt is the best assistant to solve the problem of "failure to send email notifications during comments! The following is a brief description of the setting method:
1. Search and install the Configure SMTP plug-in the background, and set it as follows:
Note: the QQ domain name mailbox is used by zumeng, so let's take it as an example. Try other mailboxes by yourself.
2. After setting this, you need to enable"POP3/IMAP/SMTP service.
Log on to your mailbox, click Settings> Account> POP3/IMAP/SMTP service at the top, and select the check box as follows:
3. Everything is ready. Use Configure SMTP to send a test email. You can receive the email.
If the configuration is correct, check whether your host does not support the mail function.
WordPress cannot send emails. It is usually caused by the server where the blog is placed, rather than the WordPress program. Linux hosts are still happy. Generally, you don't have to worry about the mail () function. Most of the Windows host's support is not very good, mainly because the spam is rampant, and IDC vendors are also the top ones. Simply banned the mail () function, which is a hundred times better.
The principle of WordPress sending mail is very simple. It is implemented through the mail () function in PHP, so the first thing we need to solve is to test the server's support for the mail () function, alibaba Cloud VPC offers three solutions as you like.
1) create a new php file named mail_test.php and add the following code:
The code is as follows: |
Copy code |
<? Php phpinfo ();?> |
Upload mail_test.php to the root directory of the website and access the file to view the detailed configuration information of your server PHP. The sendmail_path component contains-t-I, your server supports the mail () function.
2) in the preceding mail_test.php file, add the following code:
The code is as follows: |
Copy code |
<? Php $ Text = "This is a test! "; // Change the email address to yours $ Mail = 'xforwarm2010 @ gmail.com '; // Send an email Mail ($ mail, "Mail Test", $ text ); Echo "Message has been sent! "; ?> |
Access the mail_test.php file. If your mailbox receives a new email named "Mail Test", it means that your server supports mail () function.
3) add the following code to mail_test.php:
The code is as follows: |
Copy code |
<? Php If (function_exists ('mail') echo "^_^ mail () function can be used! "; Else echo "--! The mail () function cannot be used! "; ?> |