Send prefill message PrivateMsg I need a feature for my website, I want that users can send pre-filled messages to others users.

Like in an user's profile page, they just have to click on a button and then, the pre-filled message is sent.

I'm using PrivateMsg module, I don't know if this module could do the job

(By the way I'm new to Drupal).

Thanks for your help !
You may implement this: hook_privatemsg_message_presave_alter.


  Change the message before it is stored.


The $message variable contains the message's body (as well as much more parameters) ready to be edited. Note that you can include html tags in your message. Here is a code sample:

/**
 * Implements hook_privatemsg_message_presave_alter().
 * Change the message before it is stored.
 */
function my_module_privatemsg_message_presave_alter(&amp;$message) {
  // dsm($message); print out the $message contents
  $name = $message-&gt;recipients['user_1']-&gt;name; // use foreach for many recipients
  $message-&gt;body = "&lt;i&gt;Dear $user&lt;/i&gt;,\n &lt;strong&gt;you rock!&lt;/strong&gt;";
}