Class Swift_Mailer

InheritanceSwift_Mailer

Swift Mailer class.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Create a new Mailer using $transport for delivery. Swift_Mailer
createMessage() Create a new class instance of one of the message services. Swift_Mailer
getTransport() The Transport used to send messages. Swift_Mailer
newInstance() Create a new Mailer instance. Swift_Mailer
registerPlugin() Register a plugin using a known unique key (e.g. myPlugin). Swift_Mailer
send() Send the given Message like it would be sent in a mail client. Swift_Mailer

Method Details

__construct() public method

Create a new Mailer using $transport for delivery.

public void __construct ( Swift_Transport $transport )
$transport Swift_Transport
createMessage() public method

Create a new class instance of one of the message services.

For example 'mimepart' would create a 'message.mimepart' instance

public object createMessage ( $service 'message' )
$service string
getTransport() public method

The Transport used to send messages.

public Swift_Transport getTransport ( )
newInstance() public static method

Create a new Mailer instance.

public static Swift_Mailer newInstance ( Swift_Transport $transport )
$transport Swift_Transport
registerPlugin() public method

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

public void registerPlugin ( Swift_Events_EventListener $plugin )
$plugin Swift_Events_EventListener
send() public method

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.

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

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

public int send ( Swift_Mime_Message $message, &$failedRecipients null )
$message Swift_Mime_Message
$failedRecipients array

An array of failures by-reference

return int

The number of successful recipients. Can be 0 which indicates failure