I've done a bit more digging, and I believe I'm close with something like this:
PHP Code:
$data = array('sentto' => $recipients,
'msgRecipients' => $recipients,
'msgtype' = 'message',
'title' => $title,
'rawtext' => $message,
'sender' => $fromuserid,
'contenttypeid' => 27);
$pm_library = vB_Library::instance('Content_Privatemessage');
$options = array();
$pm_library->add($data, $options);
But I'm getting the error below, pretty much no matter what I do with the parameters at this point.
I'm not sure if it's the $data or the $options array that's having the "Illegal offset" problems, evan after looking at /vb/library/content/privatemessage.php
Code:
Warning: Illegal offset type in isset or empty in .../vb/library/content/privatemessage.php on line 1723 Warning: Illegal offset type in .../vb/library/content/privatemessage.php on line 1787 Warning: Illegal offset type in .../vb/library/content/privatemessage.php on line 564 API Error
Error: database_cant_escape_param
Args:
array (
0 => 'array',
)
Can anyone point me in the right direction?