4
You could try using this code in your own, this will use the PM system directly without having to hack any other files:
$pm_handler = & xoops_gethandler( 'privmessage' );
$pm = & $pm_handler -> create();
$pm -> setVar( "subject", $HTTP_POST_VARS['subject'] );
$pm -> setVar( "msg_text", $HTTP_POST_VARS['message'] );
$pm -> setVar( "to_userid", $HTTP_POST_VARS['to_userid'] );
$pm -> setVar( "from_userid", $xoopsUser -> getVar( "uid" ) );
Hope this helps