PDA

View Full Version : PM sent - email notification?


Kaitlyn2004
02-12-2010, 01:56 PM
I am using something like this:
$botpermissions['adminpermissions'] = 2;

$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('fromuserid', 4437);
$pmdm->set('fromusername', 'Admin');
$pmdm->set('title', 'Admin Notice');
$pmdm->set('message', 'This is my message');
$pmdm->set_recipients('TheirUsername', $botpermissions);
$pmdm->set('dateline', TIMENOW);

$pmdm->pre_save();

if (empty($pmdm->errors)) {
var_dump($pmdm->save());
} else {
echo 'Errors!';
print_r($pmdm->errors);
}

All works fine - what I'm wondering about is the email notification about a new PM. following the save() I don't see anything about sending out a "you have a new PM" email to those who wanted it. I also can't seem to find this in private.php either.

Any ideas? Is it handled as-is or do I need to add checks/the process to send out those emails too?

--------------- Added 1265990681 at 1265990681 ---------------

Side note - for the permissions I've seen just a straight value of 2, and a value of 2 for the adminpermissions key. Any difference/which should I use to absolutely always send that PM?