Sends a Private Message to specified user with email notification if the receiver has enabled it.
Quote
send_pm ( numeric $to , numeric $from , string $subject , string $message [ string , $smileys] )
<?php
require_once INCLUDES."infusions_include.php";
$to = 2; // Receiver's user id
$from = 1 // Sender's user id
$subject = "Welcome to PHPFusion";
$message = "Welcome to PHPFusionnnI just wanted to welcome you here to this site.";
$sendpm = send_pm($to, $from, $subject, $message);
if ($sendpm == 1) {
// Error: Receiver's inbox is full
} elseif ($sendpm == 2) {
// Error: Reciever and sender are the same user
} elseif ($sendpm == 3) {
// Sender does not exist in DB
} elseif ($sendpm == 4) {
// Reciever does not exist in DB
} elseif ($sendpm == 5) {
// Floodcontrol exceeded
} else {
// Congratulations!
}
?>