• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Send Private Message through PHP Script


Active member
In vB I was able to send PMs by using the PM API for example:

function pm_api($fromuserid, $fromusername, $title, $message, $recipients)
    global $vbulletin, $botpermissions;

    $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
        $pmdm->set('fromuserid', $fromuserid);
        $pmdm->set('fromusername', $fromusername);
        $pmdm->set('title', $title);
        $pmdm->overridequota = true;
        $pmdm->set('message', $message);
        $pmdm->set_recipients($recipients, $botpermissions);
        $pmdm->set('dateline', TIMENOW);

        return $pmdm;

Is there a way to do this in Xenforo currently?