How to email all wordpress commentors?

Uncle Tony

New member
Sep 15, 2008
428
13
0
Is there any wordpress plugin that will let me email everyone who has ever commented on that blog, and preferably every day...
 


Never seen a plugin for such a thing. I could use same thing myself for a project actually.

But you could extract all their emails from the sql db table and email them thru mailchimp, constantcontact, etc.
 
Code:
<?php

$db_host = "localhost";
$db_user = "username";
$db_password = "password";
$db_name = "database";

$connect=mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
$db=mysql_select_db($db_name, $connect) or die(mysql_error());

$result=mysql_query("select comment_author_email from wp_comments");
while($row=@mysql_fetch_assoc($result))
{
        $email=$row[comment_author_email];
        echo $email;
}

?>

this will get all the emails.
 
or you could do it via wpdb class and add it to your themes functions.php file, then just email the list.

Code:
<?php

function list_comment_emails() {
    global $wpdb;
    $emails = $wpdb->get_results('SELECT distinct comment_author_email from wp_comments');
    foreach ($emails as $email) {
        echo $email->comment_author_email;
    }
}

?>
 
sure why not, their is also wp mass mail plugin i think it lets you pick which commenters and sends an email from the admin.

but if you wanna code your own go ahead.

just thought i would give you my solution plus an already made plugin.

good luck ;)