Attempts to return a concrete IMP_Sentmail instance based on $driver.
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.
Returns the 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:
Garbage collect log entries with a probability of 1%.
void
gc
()
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.
Returns the number of recipients within a certain 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:
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:
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: