Introduction   Getting Started   Upgrading   Function Reference   Changelog   Support and Feedback

empty_pm_folder

Usage: string empty_pm_folder (string folderid[, bool keepunread])
Purpose: Empties a PM Folder.
Availability: IPB SDK 0.4

Attempts to empty the current user's PM folder with the internal folder ID folderid. Returns the number of messages deleted.

An optional keepunread argument can be set. If this is set to TRUE, all unread messages in the folder will not be deleted. By default this is set to FALSE.

If the folder does not exist, or the user is not currently logged in FALSE will be returned.

// Clears all messages in Inbox
$SDK->empty_pm_folder ("in");

// Clears messages in the Sent Items Folder, leaving unread messages
$SDK->empty_pm_folder ("in", "1");

// Clears messages in the Inbox Folder, leaving unread messages
// Prints '7 messages deleted'
echo $SDK->empty_pm_folder ("in", "1")." messages deleted";


User Contributed Notes

There are currently no user contributed notes for this page.

Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net