XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_Mailer Class Reference

Public Member Functions

 __construct (Swift_Transport $transport)
 
 batchSend (Swift_Mime_Message $message, &$failedRecipients=null, Swift_Mailer_RecipientIterator $it=null)
 
 getTransport ()
 
 registerPlugin (Swift_Events_EventListener $plugin)
 
 send (Swift_Mime_Message $message, &$failedRecipients=null)
 

Static Public Member Functions

static newInstance (Swift_Transport $transport)
 

Private Attributes

 $_transport
 

Detailed Description

Definition at line 22 of file Mailer.php.

Constructor & Destructor Documentation

Swift_Mailer::__construct ( Swift_Transport  $transport)

Create a new Mailer using $transport for delivery.

Parameters
Swift_Transport$transport

Definition at line 33 of file Mailer.php.

Member Function Documentation

Swift_Mailer::batchSend ( Swift_Mime_Message  $message,
$failedRecipients = null,
Swift_Mailer_RecipientIterator  $it = null 
)

Send the given Message to all recipients individually.

This differs from send() in the way headers are presented to the recipient. The only recipient in the "To:" field will be the individual recipient it was sent to.

If an iterator is provided, recipients will be read from the iterator one-by-one, otherwise recipient data will be retreived from the Message object.

Sender information is always read from the Message object.

The return value is the number of recipients who were accepted for delivery.

Parameters
Swift_Mime_Message$message
array&$failedRecipients,optional
Swift_Mailer_RecipientIterator$it,optional
Returns
int
See Also
send()

Definition at line 102 of file Mailer.php.

References Swift_Mime_Message\getBcc(), Swift_Mime_Message\getCc(), Swift_Mime_Message\getTo(), send(), Swift_Mime_Message\setBcc(), Swift_Mime_Message\setCc(), and Swift_Mime_Message\setTo().

Here is the call graph for this function:

Swift_Mailer::getTransport ( )

The Transport used to send messages.

Returns
Swift_Transport

Definition at line 169 of file Mailer.php.

References $_transport.

static Swift_Mailer::newInstance ( Swift_Transport  $transport)
static

Create a new Mailer instance.

Parameters
Swift_Transport$transport
Returns
Swift_Mailer

Definition at line 44 of file Mailer.php.

Referenced by RMMailer\batchSend(), and RMMailer\send().

Here is the caller graph for this function:

Swift_Mailer::registerPlugin ( Swift_Events_EventListener  $plugin)

Register a plugin using a known unique key (e.g. myPlugin).

Parameters
Swift_Events_EventListener$plugin
string$key

Definition at line 160 of file Mailer.php.

Swift_Mailer::send ( Swift_Mime_Message  $message,
$failedRecipients = null 
)

Send the given Message like it would be sent in a mail client.

All recipients (with the exception of Bcc) will be able to see the other recipients this message was sent to.

If you need to send to each recipient without disclosing details about the other recipients see batchSend().

Recipient/sender data will be retreived from the Message object.

The return value is the number of recipients who were accepted for delivery.

Parameters
Swift_Mime_Message$message
array&$failedRecipients,optional
Returns
int
See Also
batchSend()

Definition at line 68 of file Mailer.php.

Referenced by batchSend().

Here is the caller graph for this function:

Member Data Documentation

Swift_Mailer::$_transport
private

The Transport used to send messages

Definition at line 26 of file Mailer.php.

Referenced by getTransport().


The documentation for this class was generated from the following file: