Documentation

Swift_Transport

Sends Messages via an abstract Transport subsystem.

Tags
author

Chris Corbyn

Table of Contents

isStarted()  : bool
Test if this Transport mechanism has started.
ping()  : bool
Check if this Transport mechanism is alive.
registerPlugin()  : mixed
Register a plugin in the Transport.
send()  : int
Send the given Message.
start()  : mixed
Start this Transport mechanism.
stop()  : mixed
Stop this Transport mechanism.

Methods

isStarted()

Test if this Transport mechanism has started.

public isStarted() : bool
Return values
bool

ping()

Check if this Transport mechanism is alive.

public ping() : bool

If a Transport mechanism session is no longer functional, the method returns FALSE. It is the responsibility of the developer to handle this case and restart the Transport mechanism manually.

Tags
example

if (!$transport->ping()) { $transport->stop(); $transport->start(); }

The Transport mechanism will be started, if it is not already.

It is undefined if the Transport mechanism attempts to restart as long as the return value reflects whether the mechanism is now functional.

Return values
bool

TRUE if the transport is alive

send()

Send the given Message.

public send(Swift_Mime_SimpleMessage $message[, array<string|int, string> &$failedRecipients = null ]) : int

Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.

This is the responsibility of the send method to start the transport if needed.

Parameters
$message : Swift_Mime_SimpleMessage
$failedRecipients : array<string|int, string> = null

An array of failures by-reference

Return values
int

start()

Start this Transport mechanism.

public start() : mixed
Return values
mixed

stop()

Stop this Transport mechanism.

public stop() : mixed
Return values
mixed

Search results