userdata_postsave
PHP Code:
if ($usergroups_changed)
{
$pmdm =& datamanager_init('PM', $this->registry, ERRTYPE_SILENT);
$pmdm->set('fromuserid', 13454);
$pmdm->set('fromusername', 'Sendername');
eval(fetch_email_phrases('usergroupschanged', $this->fetch_field('languageid')));
$pmdm->set('title', $subject);
$pmdm->set('message', $message);
$botperms = array('adminpermissions' => 2);
$pmdm->set_recipients($this->fetch_field('username'), $botperms); // Ignore PM-Box full
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
}
Adjust fromusername, fromuserid as you need and create a phrase usergroupschanged in phrasegroups EMail Body Text/EMail Subject Text - that's it