Is there any wordpress plugin that will let me email everyone who has ever commented on that blog, and preferably every day...
<?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;
}
?>
<?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;
}
}
?>