View Full Version : Send Email When Specific User Posts
wonderfulwat
02-27-2012, 10:12 AM
Hi all,
I'd like to have a feature to receive an email when a specific user makes a post.
I don't want to moderate their posts fully, but just monitor their posting by receiving an email.
Anyone have a product/plugin for this?
Thanks!
Sarteck
02-27-2012, 07:49 PM
You could do something like so:
Create a plugin on the hook newpost_process.
Use this as the PHP:/// START CONFIG
$users_to_watch = array(1234,1235,1236);
$email_address = 'blah@bleh';
$email_subject = 'Bad User has posted: '.$vbulletin->userinfo['username'];
$email_content = 'Wahtever you want before the message...'."\n\n".$post['message']."\n\n".'...whatever you want after the message...';
/// END CONFIG
if (in_array($vbulletin->userinfo['userid'],$users_to_watch)) {mail($email_address, $email_subject, $email_content);}
Change the config stuff to whatever you want.
There's probably a few more elegant ways, but that's about the simplest.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.