Class IMP_Sentmail

Description

The IMP_Sentmail:: class contains all functions related to handling logging of sent mail and retrieving sent mail statistics.

$Horde: imp/lib/Sentmail.php,v 1.16.2.3 2009/01/06 15:24:04 jan Exp $

Copyright 2005-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.fsf.org/copyleft/gpl.html.

Located in /lib/Sentmail.php (line 17)


	
			
Direct descendents
Class Description
 class IMP_Sentmail_sql IMP_Sentmail implementation for PHP's PEAR database abstraction layer.
Method Summary
 mixed factory ([string $driver = null], [array $params = null])
 array favouriteRecipients (integer $limit, [array $filter = array('new', 'forward', 'reply', 'redirect')])
 void gc ()
 void log (string $action, string $message_id, string|array $recipients, [boolean $success = true])
 integer numberOfRecipients (integer $hours, [boolean $user = false])
 void _deleteOldEntries (integer $before)
 void _log (string $action, string $message_id,  $recipient, boolean $success, string $recipients)
Methods
factory (line 118)

Attempts to return a concrete IMP_Sentmail instance based on $driver.

  • return: The newly created concrete IMP_Sentmail instance, or false on an error.
mixed factory ([string $driver = null], [array $params = null])
  • string $driver: The type of the concrete IMP_Sentmail subclass to return. The class name is based on the storage driver ($driver). The code is dynamically included.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.
favouriteRecipients (line 64)

Returns the most favourite recipients.

  • return: A list with the $limit most favourite recipients.
array favouriteRecipients (integer $limit, [array $filter = array('new', 'forward', 'reply', 'redirect')])
  • integer $limit: Return this number of recipients.
  • array $filter: A list of messages types that should be returned. A value of null returns all message types.

Redefined in descendants as:
gc (line 86)

Garbage collect log entries with a probability of 1%.

void gc ()
log (line 28)

Logs an attempt to send a message.

void log (string $action, string $message_id, string|array $recipients, [boolean $success = true])
  • string $action: Why the message was sent, i.e. "new", "reply", "forward", etc.
  • string $message_id: The Message-ID.
  • string|array $recipients: The list of message recipients.
  • boolean $success: Whether the attempt was successful.
numberOfRecipients (line 78)

Returns the number of recipients within a certain time period.

  • return: The number of recipients in the given time period.
integer numberOfRecipients (integer $hours, [boolean $user = false])
  • integer $hours: Time period in hours.
  • boolean $user: Return the number of recipients for the current user?

Redefined in descendants as:
_deleteOldEntries (line 100)

Deletes all log entries older than a certain date.

void _deleteOldEntries (integer $before)
  • integer $before: Unix timestamp before that all log entries should be deleted.

Redefined in descendants as:
_log (line 51)

Logs an attempt to send a message per recipient.

void _log (string $action, string $message_id,  $recipient, boolean $success, string $recipients)
  • string $action: Why the message was sent, i.e. "new", "reply", "forward", etc.
  • string $message_id: The Message-ID.
  • string $recipients: A message recipient.
  • boolean $success: Whether the attempt was successful.
  • $recipient

Redefined in descendants as:

Documentation generated on Sun, 30 Jan 2011 05:28:17 +0000 by phpDocumentor 1.4.3