Wordpress cannot receive comments email reminder solution

Source: Internet
Author: User
WordPress blog is currently the most widely used independent blog program on the Internet. It is favored by many bloggers and wordpress fans. I have been using wordpress for more than two years. I believe many of my friends have encountered many problems like me at the beginning. The next series of original experiences are as follows, this will solve the problems frequently encountered in wordpress usage.
We know that an independent blog must have its own domain name and host. Our wordpress blog program is stored on the host of the service provider, and the wordpress blog program is developed using the PHP program, however, some hosts do not support the mail () function in php. In this way, when a reader leaves a message on our blog, we cannot receive an email reminder and must go to the blog to see it, you cannot interact with readers in a timely manner. Therefore, this problem must be solved. This is a must for building a personal blog with high popularity.
If you want to know that someone has left a message on your blog and then reply to the message immediately before notifying the email, you need to have the email notification function on the WordPress blog. This function can be implemented using the relevant plug-ins. However, I have tried a few plug-ins to reply to emails, but these plug-ins are not satisfied. They mainly do not support reminders of all email types. the use of SMTP plug-in can solve this problem well.
1. Configure SMTP in the wordpress background.
  • Generally, if your host supports the mail () function in PHP, you will receive an email notification after you make a simple setting, however, most hosts currently do not support this function. Therefore, you need to configure and manage emails in the wordpress background.
  • Go to your wordpress background, click "discuss" under "Settings", and check the two backend emails.
  • Find my personal data under the user column and set the account for receiving email notifications. Set the email address as shown in the following figure.
  • Under plug-in management, select the plug-in installation section and search for and install the Configure SMTP plug-in. Click search plug-in. The following page is displayed normally.
  • Click Install now to enable the plug-in after installation. Configure SMTP. After the plug-in is successfully installed and enabled, configure the plug-in. Under the settings menu, you can see a SMTP sub-menu, which is the configuration interface of the Configure SMTP plug-in. The specific settings are as follows. Here we use qq mail as an example. After saving the configuration information, perform an email test to check whether the configuration is successful.
  • As long as the email account, password, SMTP server, and port are correct, a test email will be sent to your mailbox.
  • In addition, for QQ mail, you must make a setting to ensure that the SMTP service can be successfully enabled. Log on to your QQ mailbox, click Settings> Account> POP3/IMAP/SMTP service on the top, and select the service as shown in the following figure:
  • After setting, you can accept emails.
2. Configure SMTP through code
Use the ftp tool to connect to your space and find functions. php under the wordpress file (the default path is... /Wp-content/themes/twentyeleven/fuinctions. php), add the following code.
// Send an email using smtp
Add_action ('phpmailer _ init', 'mail _ smtp ');
Function mail_smtp ($ phpmailer ){
$ Phpmailer-> IsSMTP ();
$ Phpmailer-> SMTPAuth = true; // enable the SMTPAuth service
$ Phpmailer-> Port = 465; // MTP mail sending Port, which corresponds to the following. If 25 is entered here, the following is blank
$ Phpmailer-> SMTPSecure = "ssl"; // whether to verify ssl. This corresponds to the preceding one. If this parameter is not set, the preceding port must be 25.
$ Phpmailer-> Host =
"Smtp.gmail.com"; // SMTP server address of the mailbox. For QQ, the address is smtp.exmail.qq.com.
$ Phpmailer-> Username = "admin@gmail.com ";//
Your email address $ phpmailer-> Password = "******"; // your email login Password
}

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.