\Swift_Plugins_RedirectingPlugin
Redirects all email to a single recipient.
- Author: Fabien Potencier
Synopsis
class Swift_Plugins_RedirectingPlugin
implements
Swift_Events_SendListener
{
- // members
- private string $_recipient;
- private array $_whitelist;
- // methods
- public void __construct()
- public void setRecipient()
- public int getRecipient()
- public void setWhitelist()
- public array getWhitelist()
- public void beforeSendPerformed()
- private void _filterHeaderSet()
- private array _filterNameAddresses()
- protected bool _isWhitelisted()
- public void sendPerformed()
- private void _restoreMessage()
Hierarchy
Implements
Members
private
- $_recipient
—
string
The recipient who will receive all messages. - $_whitelist
—
array
List of regular expression for recipient whitelisting
Methods
private
- _filterHeaderSet() — Filter header set against a whitelist of regular expressions
- _filterNameAddresses() — Filtered list of addresses => name pairs
- _restoreMessage()
protected
- _isWhitelisted() — Matches address against whitelist of regular expressions
public
- __construct() — Create a new RedirectingPlugin.
- beforeSendPerformed() — Invoked immediately before the Message is sent.
- getRecipient() — Get the recipient of all messages.
- getWhitelist() — Get the whitelist
- sendPerformed() — Invoked immediately after the Message is sent.
- setRecipient() — Set the recipient of all messages.
- setWhitelist() — Set a list of regular expressions to whitelist certain recipients