PHP Class Horde_Spam_Email, horde

Author: Michael Slusarz ([email protected])
Author: Jan Schneider ([email protected])
Inheritance: extends Horde_Spam_Base
ファイルを表示 Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_email string Target e-mail address.
$_format string E-mail format.
$_from_addr string Sending e-mail address.
$_mail Horde_Mail_Transport Mail transport.
$_opts array Additional options.
$_user string The reporting user.

Public Methods

Method Description
__construct ( Horde_Mail_Transport $mail, string $email, string $from, string $user, string $format, array $opts = [] ) Constructor.
report ( array $msgs, $action )

Protected Methods

Method Description
_makeStream ( string | resource $val ) : Horde_Stream Converts a string or resource into a Horde_Stream object.
_redirectMessage ( Horde_Stream $message ) Sends a redirect (a/k/a resent) message.
_reportDigest ( array $messages, integer $action ) : integer Builds and sends a digest message.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Mail_Transport $mail, string $email, string $from, string $user, string $format, array $opts = [] )
$mail Horde_Mail_Transport The mail transport to use.
$email string E-mail address to send reports to.
$from string E-mail address to send reports from.
$user string A user name for information purposes.
$format string E-mail format. Either 'redirect' or 'digest'.
$opts array Additional options: - digest_limit_msgs: (integer) Maximum number of messages allowed in a digest. - digest_limit_size: (integer) Maximum size of a digest.

_makeStream() protected method

Converts a string or resource into a Horde_Stream object.
protected _makeStream ( string | resource $val ) : Horde_Stream
$val string | resource Some content.
return Horde_Stream A Horde_Stream object with the content.

_redirectMessage() protected method

Sends a redirect (a/k/a resent) message.
protected _redirectMessage ( Horde_Stream $message )
$message Horde_Stream Message content.

_reportDigest() protected method

Builds and sends a digest message.
protected _reportDigest ( array $messages, integer $action ) : integer
$messages array List of message contents (string|resource).
$action integer Either Horde_Spam::SPAM or Horde_Spam::INNOCENT.
return integer The number of reported messages.

report() public method

public report ( array $msgs, $action )
$msgs array

Property Details

$_email protected_oe property

Target e-mail address.
protected string $_email
return string

$_format protected_oe property

E-mail format.
protected string $_format
return string

$_from_addr protected_oe property

Sending e-mail address.
protected string $_from_addr
return string

$_mail protected_oe property

Mail transport.
protected Horde_Mail_Transport $_mail
return Horde_Mail_Transport

$_opts protected_oe property

Additional options.
protected array $_opts
return array

$_user protected_oe property

The reporting user.
protected string $_user
return string