overloading the destination url of privatemsg I have a privatemsg message form, and I need to alter the success URL that loads when a message is sent. What is the easiest way to go about doing this? The code i'm using is more or less based on the example code used here:

 module_load_include('pages.inc','privatemsg');dru
 print drupal_render(drupal_get_form('privatemsg_new'));
Using the Devel module implement hook_form_alter and find your forms $form_id. Then supply a #redirect FAPI attribute like, $form['#redirect'] = 'my-custom-thankyou-page'; and be sure to make your custom page as a drupal Page, module callback, View etc.