Hi,
I had the same need so I just got done writing and testing a similar plugin. Here it is:
Code:
$ug = $user['usergroupid'];
$admin_message = "";
if (($user['options'] & $this->registry->bf_misc_useroptions['emailonpm']) AND ($ug == 5 OR $ug == 6))
{
$touserinfo =& $user;
$plaintext_parser->set_parsing_language($touserinfo['languageid']);
$admin_message = $plaintext_parser->parse($this->fetch_field('message'), 'privatemessage');
$admin_message = "Message:\n*********\n" . $admin_message . "\n*********\n";
}
Create a new plugin and set it to hook "pmdata_postsave_recipient", as said previously. Paste in the above code. In the IF statement, make sure all of the usergroups you want to get your changes are listed.
In my above example, we normally dont show the contents of the PM. This way people have to come to the website to see what it said. Here, I'm checking if its a mod or an admin, and creating a NEW variable called admin_message. I then go into the pmreceived email template and add the new variable "$admin_message" to the template. This will only have a value if the PM is going to an admin or to a mod.
I hope this helps.