Forum Replies Created
Gautam that is the source.i adopted it from Thomas Klaiber post notification plugin.Klaiber plugin sends one email notification on topics in their favourites only without the contents.so i need to figure out how to reply to a post through email.
global $bbdb, $bb_table_prefix, $topic_id,$bb_current_user,$post_id;
$all_users = notification_select_all_users();
foreach ($all_users as $userdata) :
$topic = get_topic($topic_id);
$posts = get_thread($topic_id, 1, 1);
$posts = array_reverse($posts);
$last = array_pop($posts);
$last_text = strip_tags($last->post_text);
$message = __(“There is a new post on the forumnnTopic title: %1$s nPosted by: %2$snn Url:%3$s nn Contents nn %4$s”);
mail( $userdata->user_email, bb_get_option(‘name’) . ‘:’ . __(‘Notification’),
sprintf( $message, $topic->topic_title,get_user_name($bb_current_user->ID),get_topic_link($topic_id),$last_text),
‘From: ‘ . bb_get_option(‘admin_email’) );
$all_users = $bbdb->get_results(“SELECT ID, user_email FROM $bbdb->users WHERE user_status=0”);
i have now figured out how to send forum posts to registered users through email but what i have failed is to let users reply to this post through email.please any one have an idea.