Documentation

IMP_Sentmail_Null extends IMP_Sentmail
in package

A null implementation of the sentmail driver.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2010-2017 Horde LLC

license

http://www.horde.org/licenses/gpl GPL

Table of Contents

Constants

FORWARD  = 'forward'
MDN  = 'mdn'
NEWMSG  = 'new'
REDIRECT  = 'redirect'
REPLY  = 'reply'

Properties

$limit_period  : int
$threshold  : int
$_params  : array<string|int, mixed>
Hash containing configuration parameters.

Methods

__construct()  : mixed
Constructor.
__get()  : mixed
favouriteRecipients()  : array<string|int, mixed>
Returns the favourite recipients.
gc()  : mixed
Garbage collect log entries.
log()  : mixed
Logs an attempt to send a message.
numberOfRecipients()  : int
Returns the number of recipients within a certain time period.
_deleteOldEntries()  : mixed
Deletes all log entries older than a certain date.
_log()  : mixed
Logs an attempt to send a message per recipient.

Constants

FORWARD

public mixed FORWARD = 'forward'

REDIRECT

public mixed REDIRECT = 'redirect'

Properties

$limit_period read-only

public int $limit_period

If limiting recipients per time period, how many hours should this period last?

$threshold read-only

public int $threshold

How many days should old log entries be kept?

$_params

Hash containing configuration parameters.

protected array<string|int, mixed> $_params = array()

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed> = array()

Configuration parameters the driver needs.

Tags
throws
IMP_Exception

__get()

public __get(mixed $name) : mixed
Parameters
$name : mixed

favouriteRecipients()

Returns the favourite recipients.

public favouriteRecipients(mixed $limit[, mixed $filter = null ]) : array<string|int, mixed>
Parameters
$limit : mixed

Return this number of recipients.

$filter : mixed = null

A list of messages types that should be returned. Null returns all message types.

Return values
array<string|int, mixed>

A list with the $limit most favourite recipients.

gc()

Garbage collect log entries.

public gc() : mixed

log()

Logs an attempt to send a message.

public log(int $action, string $message_id, string|array<string|int, mixed> $recipients[, bool $success = true ]) : mixed
Parameters
$action : int

Why the message was sent (IMP_Sentmail constant).

$message_id : string

The Message-ID.

$recipients : string|array<string|int, mixed>

The list of message recipients.

$success : bool = true

Whether the attempt was successful.

numberOfRecipients()

Returns the number of recipients within a certain time period.

public numberOfRecipients(mixed $hours[, mixed $user = false ]) : int
Parameters
$hours : mixed

Time period in hours.

$user : mixed = false

Return the number of recipients for the current user?

Return values
int

The number of recipients in the given time period.

_deleteOldEntries()

Deletes all log entries older than a certain date.

protected _deleteOldEntries(mixed $before) : mixed
Parameters
$before : mixed

Unix timestamp before that all log entries should be deleted.

_log()

Logs an attempt to send a message per recipient.

protected _log(mixed $action, mixed $message_id, mixed $recipient, mixed $success) : mixed
Parameters
$action : mixed

Why the message was sent (IMP_Sentmail constant).

$message_id : mixed

The Message-ID.

$recipient : mixed

A message recipient.

$success : mixed

Whether the attempt was successful.


        
On this page

Search results