You are here

function privatemsg_send_privatemsg in Privatemsg 5

Same name and namespace in other branches
  1. 5.3 privatemsg.module \privatemsg_send_privatemsg()

Send private message. Sender is the current user.

Parameters

$recipient: A user object containing the recipient.

$subject: The subject of the message.

$body: The body of the message.

$format: Format of the message.

$thread: The thread this message belongs to (take care to preserve on replies).

$type: Type of the message as defined on admin/build/privatemsg .

$variables: If this message is a subscriptions mail, the variables used to compose the message.

File

./privatemsg.module, line 1636

Code

function privatemsg_send_privatemsg($recipient, $subject, $body, $format = FILTER_FORMAT_DEFAULT, $thread = 0, $type = 'private-message', $variables = array()) {
  global $user;
  return _privatemsg_send($user, $recipient, $subject, $body, $format, $thread, $type, $variables);
}