In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to configure WordPress". In daily operation, I believe many people have doubts about how to configure WordPress. Xiaobian consulted all kinds of materials and sorted out simple and easy operation methods. I hope to help you answer the doubts about "how to configure WordPress"! Next, please follow the small series to learn together!
It goes without saying the benefits of replying to email notifications. However, it is still troublesome for hosts that do not support the mail function. When searching for tutorials on the Internet, almost all of them said that they needed to modify the code in class-smtp.php in include. However, when I opened class-smtp.php, I found that the code location and structure were different from those shown in the tutorial. After a closer look, it turns out that the latest version of WordPress is already compatible with fsockopen. This means that in the new version of WordPress, there is no need to modify any code in class-smtp.php. The configuration method is very simple. Take the latest version 4.4.2 as an example.
Step 1: Open fsockopen
Log in to the server host background, find the PHP environment-related settings interface, and set the fsockopen function to ON. Please consult customer service if you cannot find it.
Step 2: Install smtp plugin
I use WP SMTP this plug-in, configuration is relatively simple. The following is a description of the plug-in configuration items:
From Address-> The email address you used to send the message
sender nickname-> used to show sender
SMTP server address-> can be found in the client settings of mailbox (e.g. mailbox 126: smtp.126.com)
SMTP encryption method-> Set according to mailbox
SMTP port-> Same as above, common ssl port number is 465; common port 25
SMTP authentication-> YES
Username-> Email Address
Password-> Email Login Password
After setting, you can fill in an email address for testing. If the test is successful, then continue to the next step.
Step 3: Add the message content
Paste the code directly into the theme folder function.php. The style code in html tags can be modified to suit your needs.
function comment_mail_notify($comment_id) {$comment = get_comment($comment_id);$parent_id = $comment->comment_parent ? $comment->comment_parent : '';$spam_confirmed = $comment->comment_approved;if (($parent_id != '') && ($spam_confirmed != 'spam')) {$wp_email = 'beyond0420@126.com' . preg_replace('#^www.# ', ', strtolower($_SERVER ['SERVER_NAME']); //e-mail origin point, no-reply can be changed to available e-mail.$ to = trim(get_comment($parent_id)->comment_author_email);$subject = '[' . get_option("blogname") . '] There is a new reply to your message';$message = '
' . trim(get_comment($parent_id)->comment_author) . 'Hello!
You were in the. get_the_title($comment->comment_post_ID) . '"'s message:
' . trim(get_comment($parent_id)->comment_content) . '
' . trim($comment->comment_author) . 'Reply to you:
' . trim($comment->comment_content) . '
click to view
This email was sent automatically by the system. Please do not reply.
© ' . get_option('blogname') . '
';$from = "From: \"" . get_option('blogname') . "\" ";$headers = "$from\nContent-Type: text/html; charset=" . get_option('blog_charset') . "\n"; wp_mail( $to, $subject, $message, $headers ); } }add_action ('comment_post','comment_mail_notify'); At this point, the study of "How to configure WordPress" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.