save_pm
Usage: bool save_pm (int recepient_id, string subject, string message[, array ccusersid])
Purpose: Saves a personal message.
Availability: IPB SDK 0.4
Purpose: Saves a personal message.
Availability: IPB SDK 0.4
Returns TRUE if a message could be saved, with the recipient recipient_id, subject subject, and message message.
You can also provide an array of account ids in ccusersid, of which messages will also be sent to.
If the message could not be saved, due to invalid input or any other reasons FALSE will be returned. The error message can be accessed with sdk_error
/* Saves a PM to User ID 1 with the Subject Hello! */
$SDK->save_pm ("1", "Hello!", "Hello! This is a test message sent to user id 1");
/* Saves a PM to User ID 1 with the Subject Hello!, and CCs to users 2, 3 and 4 */
$SDK->save_pm ("1", "Hello!", "Hello! This is a test message sent to user id 1", array("2", "3", "4"));
/* Saves a message to member "bob" */
$SDK->save_pm (name2id("bob"), "Hello!", "Hello! This is a test message sent to user id 1");
/* Message Sender with Error Catcher */
if (!$SDK->save_pm ($userid, $subject, $message)) {
echo $SDK->sdk_error();
}
else {
echo 'Message Saved!';
}
/* Sends a message to member "cow" and keeps a copy in the Sent Items folder */
$SDK->save_pm ($SDK->name2id("cow"), "Hiya", "Hello Cow :)");
$SDK->save_pm ("1", "Hello!", "Hello! This is a test message sent to user id 1");
/* Saves a PM to User ID 1 with the Subject Hello!, and CCs to users 2, 3 and 4 */
$SDK->save_pm ("1", "Hello!", "Hello! This is a test message sent to user id 1", array("2", "3", "4"));
/* Saves a message to member "bob" */
$SDK->save_pm (name2id("bob"), "Hello!", "Hello! This is a test message sent to user id 1");
/* Message Sender with Error Catcher */
if (!$SDK->save_pm ($userid, $subject, $message)) {
echo $SDK->sdk_error();
}
else {
echo 'Message Saved!';
}
/* Sends a message to member "cow" and keeps a copy in the Sent Items folder */
$SDK->save_pm ($SDK->name2id("cow"), "Hiya", "Hello Cow :)");
See Also: write_pm
User Contributed Notes
Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net
There are currently no user contributed notes for this page.