How to Automatically Notify Subscribers of New Posts
Wouldn’t it be great if you could automatically send an email to your registered subscribers and notify them of a new post?
Simply add this code to your functions.php file, and all registered users will receive an email when a new post is published.
[php]
function email_members($post_ID) {
global $wpdb;
$usersarray = $wpdb->get_results("SELECT user_email FROM $wpdb->users;");
$users = implode(",", $usersarray);
mail($users, "New WordPress recipe online!", ‘A new recipe have been published on http://www.wprecipes.com’);
return $post_ID;
}
add_action(‘publish_post’, ‘email_members’);
[/php]
Related Articles
Twitter Feed
- No public Twitter messages.
Tags
android aweber backup book clubrunner dacdb email marketing facebook fbi foursquare functions gmail gmail filters gmail signatures google google buzz iPad iphone linkedin linux Local Marketing myspace newsletter openoffice os x polio plus prescott az prescott enews prescott young professionals press releases projects ratepoint Rotary Club search security seo social social media techcrunch tweetdeck twitter website speed windows wonderhowto wordpressSigma Web Technologies








