This should work, I don't see why it shouldn't (I don't know if the " around $message will make a difference or not?).
PHP Code:
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,messageread,folderid) VALUES (NULL,$pm_userid,$pm_userid,$bbuserinfo[userid],'".addslashes(htmlspecialchars($pm_title))."','".addslashes("$message")."',".time().",0,0)");
It should parse the vB Code like it would if a user was sending it.