function privatemsg_send_privatemsg in Privatemsg 5.3
Same name and namespace in other branches
- 5 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 1619
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);
}