Class Swift_Mailer
Inheritance | Swift_Mailer |
---|
Swift Mailer class.
Public Methods
Method | Description | Defined 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
Create a new Mailer using $transport for delivery.
public void __construct ( Swift_Transport $transport ) | ||
$transport | Swift_Transport |
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 |
The Transport used to send messages.
public Swift_Transport getTransport ( ) |
Create a new Mailer instance.
public static Swift_Mailer newInstance ( Swift_Transport $transport ) | ||
$transport | Swift_Transport |
Register a plugin using a known unique key (e.g. myPlugin).
public void registerPlugin ( Swift_Events_EventListener $plugin ) | ||
$plugin | Swift_Events_EventListener |
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, <b>&</b>$failedRecipients = null ) | ||
$message | Swift_Mime_Message | |
$failedRecipients | array | An array of failures by-reference |