Documentation

CRM_Utils_Mail_FilteredPearMailer extends Mail
in package

The filtered-mailer is a utility to wrap an existing PEAR Mail class and apply extra filters. It is primarily intended for resolving quirks in the standard implementations.

This wrapper acts a bit like a chameleon, passing-through properties from the underlying object. Consequently, internal properties are prefixed with _ to avoid conflict.

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Properties

$_delegate  : Mail
$_driver  : string
$_filters  : array<string|int, callable>
$_params  : array<string|int, mixed>

Methods

__construct()  : mixed
CRM_Utils_Mail_FilteredPearMailer constructor.
__destruct()  : mixed
__get()  : mixed
__isset()  : mixed
__set()  : mixed
__unset()  : mixed
addFilter()  : static
disconnect()  : mixed
getDriver()  : string
send()  : mixed

Properties

Methods

__construct()

CRM_Utils_Mail_FilteredPearMailer constructor.

public __construct(string $driver, array<string|int, mixed> $params, Mail $mailer) : mixed
Parameters
$driver : string
$params : array<string|int, mixed>
$mailer : Mail

__set()

public __set(mixed $name, mixed $value) : mixed
Parameters
$name : mixed
$value : mixed

addFilter()

public addFilter(string $id, callable $func) : static
Parameters
$id : string

Unique ID for this filter. Filters are sorted by ID. Suggestion: '{nnnn}_{name}', where '{nnnn}' is a number. Filters are sorted and executed in order.

$func : callable

function(FilteredPearMailer $mailer, mixed $recipients, array $headers, string $body). The return value should generally be null/void. However, if you wish to short-circuit execution of the filters, then return a concrete value.

Return values
static

getDriver()

public getDriver() : string
Return values
string

Ex: 'smtp', 'sendmail', 'mail'.

send()

public send(mixed $recipients, mixed $headers, mixed $body) : mixed
Parameters
$recipients : mixed
$headers : mixed
$body : mixed

        
On this page

Search results