PHP Class Swift_Mailer, Halite

Author: Chris Corbyn
Mostrar archivo Open project: HaliteChallenge/Halite Class Usage Examples

Public Methods

Method Description
__construct ( Swift_Transport $transport ) Create a new Mailer using $transport for delivery.
createMessage ( string $service = 'message' ) : object Create a new class instance of one of the message services.
getTransport ( ) : Swift_Transport The Transport used to send messages.
newInstance ( Swift_Transport $transport ) : Swift_Mailer Create a new Mailer instance.
registerPlugin ( Swift_Events_EventListener $plugin ) Register a plugin using a known unique key (e.g. myPlugin).
send ( Swift_Mime_Message $message, array &$failedRecipients = null ) : integer Send the given Message like it would be sent in a mail client.

Method Details

__construct() public method

Create a new Mailer using $transport for delivery.
public __construct ( Swift_Transport $transport )
$transport Swift_Transport

createMessage() public method

For example 'mimepart' would create a 'message.mimepart' instance
public createMessage ( string $service = 'message' ) : object
$service string
return object

getTransport() public method

The Transport used to send messages.
public getTransport ( ) : Swift_Transport
return Swift_Transport

newInstance() public static method

Create a new Mailer instance.
public static newInstance ( Swift_Transport $transport ) : Swift_Mailer
$transport Swift_Transport
return Swift_Mailer

registerPlugin() public method

Register a plugin using a known unique key (e.g. myPlugin).
public registerPlugin ( Swift_Events_EventListener $plugin )
$plugin Swift_Events_EventListener

send() public method

All recipients (with the exception of Bcc) will be able to see the other recipients this message was sent to. Recipient/sender data will be retrieved from the Message object. The return value is the number of recipients who were accepted for delivery.
public send ( Swift_Mime_Message $message, array &$failedRecipients = null ) : integer
$message Swift_Mime_Message
$failedRecipients array An array of failures by-reference
return integer The number of successful recipients. Can be 0 which indicates failure