当前位置: 动力学知识库 > 问答 > 编程问答 >

Stop wordpress from sending out moderation emails

问题描述:

I'm having trouble with my wordpress installation sending out emails to the site admin

every time a comment is up for moderation.

This also goes for spam comments which results in the site admin getting alot of junk emails in his inbox.

Every time I google this problem I end up with the answer "Just go to Settings -> Discussion and unclick 'A comment is held for moderation'" but unfortunately this is not helping me.

So, here are my settings (some of these may be irrelevant):

  1. I'm using wordpress' built in comment-system. No disqus or facebook comments.
  2. I've installed the Akismet-plugin. I did try to disable the plugin, but I still get the emails.
  3. Both "Anyone posts a comment" and "A comment is held for moderation" is NOT checked under "Settings" -> "Discussion" -> "E-mail me whenever" on the sites.
  4. You do not have to be logged in to write a comment
  5. The WP installation is originally a Wordpress MU installation, but I've upgraded to 3.x so it's now build into the regular wordpress installation. The installation run many blogs with different domain names and the problem occurs on all blogs AFAIK.
  6. Most of the blogs are using the "Yashfa BRANDED!" theme

The moderation email looks like this:


Subject: [SITENAME] Please moderate: "Test spam comments"


Body:

A new comment on the post 78 "Test spam comments" is waiting for your approval

http://url/test-spam-comments/

Author : djqw21208ryfg23 (IP: XXX.XXX.XXX.XXX , XXX.XXX.XXX.XXX)

E-mail : [email protected]

URL : http://feg239r239f9fg7329rfg322379fg23f3

Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=XXX.XXX.XXX.XXX

Comment:

ugly spam comment goes here...

Approve it: http://url/wp-admin/comment.php?action=mac&c=XXXXX

Delete it: http://url/wp-admin/comment.php?action=cdc&c=XXXXX

Spam it: http://url/wp-admin/comment.php?action=cdc&dt=spam&c=XXXXX

Currently 0 comments are waiting for approval.

Please visit the moderation panel:

http://url/wp-admin/moderation.php


Is there a setting I've forgotten to check?

Why do I keep on getting these emails even though I've turned off the email-settings under "Settings" -> "Discussion"?

网友答案:

I'm having the same problem: wordpresses sending out mails. I host some wordpress blogs for other people, who sometimes drop off the planet and don't look after them any more. I do have full access to the database, so this is my method of closing wordpress down for comments and disabeling the mail:

(this assumes the default table-prefix of wp_*)

There are two options that influence the sending of mail: comments_notify and moderation_notify. I set both to false:

  UPDATE wp_options SET option_value=0 WHERE option_name LIKE "%notify";

I also delete all the un-approved comments:

  DELETE FROM `wp_comments` WHERE `comment_approved` = 0;

and close all the posts and pages for further comments:

  UPDATE  `wp_posts` SET comment_status='closed';

and then there's still the mailqueue to clean up .... :-(

分享给朋友:
您可能感兴趣的文章:
随机阅读: