![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct (Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher) | |
setLocalDomain ($domain) | |
getLocalDomain () | |
setSourceIp ($source) | |
getSourceIp () | |
start () | |
isStarted () | |
send (Swift_Mime_Message $message, &$failedRecipients=null) | |
stop () | |
registerPlugin (Swift_Events_EventListener $plugin) | |
reset () | |
getBuffer () | |
executeCommand ($command, $codes=array(), &$failures=null) | |
__destruct () | |
Protected Member Functions | |
_getBufferParams () | |
_readGreeting () | |
_doHeloCommand () | |
_doMailFromCommand ($address) | |
_doRcptToCommand ($address) | |
_doDataCommand () | |
_streamMessage (Swift_Mime_Message $message) | |
_getReversePath (Swift_Mime_Message $message) | |
_throwException (Swift_TransportException $e) | |
_assertResponseCode ($response, $wanted) | |
_getFullResponse ($seq) | |
Protected Attributes | |
$_buffer | |
$_started = false | |
$_domain = '[127.0.0.1]' | |
$_eventDispatcher | |
$_sourceIp | |
Private Member Functions | |
_doMailTransaction ($message, $reversePath, array $recipients, array &$failedRecipients) | |
_sendTo (Swift_Mime_Message $message, $reversePath, array $to, array &$failedRecipients) | |
_sendBcc (Swift_Mime_Message $message, $reversePath, array $bcc, array &$failedRecipients) | |
_lookupHostname () | |
_isFqdn ($hostname) | |
Sends Messages over SMTP.
Definition at line 16 of file AbstractSmtpTransport.php.
__construct | ( | Swift_Transport_IoBuffer | $buf, |
Swift_Events_EventDispatcher | $dispatcher | ||
) |
Creates a new EsmtpTransport using the given I/O buffer.
Swift_Transport_IoBuffer | $buf | |
Swift_Events_EventDispatcher | $dispatcher |
Definition at line 42 of file AbstractSmtpTransport.php.
References _lookupHostname().
__destruct | ( | ) |
|
protected |
Throws an Exception if a response code is incorrect
Definition at line 371 of file AbstractSmtpTransport.php.
References $response, and _throwException().
Referenced by _readGreeting(), and executeCommand().
|
protected |
Send the DATA command
Definition at line 317 of file AbstractSmtpTransport.php.
References executeCommand().
Referenced by _doMailTransaction().
|
protected |
Send the HELO welcome
Definition at line 293 of file AbstractSmtpTransport.php.
References executeCommand().
Referenced by start().
|
protected |
Send the MAIL FROM command
Definition at line 301 of file AbstractSmtpTransport.php.
References executeCommand().
Referenced by _doMailTransaction().
|
private |
Send an email to the given recipients from the given reverse path
Definition at line 413 of file AbstractSmtpTransport.php.
References _doDataCommand(), _doMailFromCommand(), _doRcptToCommand(), _streamMessage(), and reset().
Referenced by _sendBcc(), and _sendTo().
|
protected |
Send the RCPT TO command
Definition at line 309 of file AbstractSmtpTransport.php.
References executeCommand().
Referenced by _doMailTransaction().
|
abstractprotected |
Return an array of params for the Buffer
Referenced by start().
|
protected |
Get an entire multi-line response using its sequence number
Definition at line 392 of file AbstractSmtpTransport.php.
References $response, and _throwException().
Referenced by _readGreeting(), and executeCommand().
|
protected |
Determine the best-use reverse path for this message
Definition at line 337 of file AbstractSmtpTransport.php.
References elseif, Swift_Mime_Message\getFrom(), Swift_Mime_Message\getReturnPath(), Swift_Mime_Message\getSender(), and reset().
Referenced by Swift_Transport_SendmailTransport\send(), and send().
|
private |
Determine is the $hostname is a fully-qualified name
Definition at line 473 of file AbstractSmtpTransport.php.
Referenced by _lookupHostname().
|
private |
Try to determine the hostname of the server this is run on
Definition at line 462 of file AbstractSmtpTransport.php.
References _isFqdn(), and elseif.
Referenced by __construct().
|
protected |
Read the opening SMTP greeting
Definition at line 287 of file AbstractSmtpTransport.php.
References _assertResponseCode(), and _getFullResponse().
Referenced by start().
|
private |
Send a message to all Bcc: recipients
Definition at line 448 of file AbstractSmtpTransport.php.
References _doMailTransaction(), and Swift_Mime_Message\setBcc().
Referenced by send().
|
private |
Send a message to the given To: recipients
Definition at line 437 of file AbstractSmtpTransport.php.
References _doMailTransaction().
Referenced by send().
|
protected |
Stream the contents of the message over the buffer
Definition at line 323 of file AbstractSmtpTransport.php.
References _throwException(), executeCommand(), and Swift_Mime_MimeEntity\toByteStream().
Referenced by _doMailTransaction().
|
protected |
Throw a TransportException, first sending it to any listeners
Definition at line 358 of file AbstractSmtpTransport.php.
Referenced by _assertResponseCode(), Swift_Transport_EsmtpTransport\_doHeloCommand(), _getFullResponse(), _streamMessage(), Swift_Transport_SendmailTransport\send(), send(), start(), and stop().
executeCommand | ( | $command, | |
$codes = array() , |
|||
& | $failures = null |
||
) |
Run a command against the buffer, expecting the given response codes.
If no response codes are given, the response will not be validated. If codes are given, an exception will be thrown on an invalid response.
string | $command | |
int[] | $codes | |
string[] | $failures An array of failures by-reference |
Definition at line 273 of file AbstractSmtpTransport.php.
References $response, _assertResponseCode(), and _getFullResponse().
Referenced by _doDataCommand(), _doHeloCommand(), _doMailFromCommand(), _doRcptToCommand(), _streamMessage(), reset(), and stop().
getBuffer | ( | ) |
Get the IoBuffer where read/writes are occurring.
Definition at line 256 of file AbstractSmtpTransport.php.
References $_buffer.
Referenced by Swift_Transport_SendmailTransport\send().
getLocalDomain | ( | ) |
Get the name of the domain Swift will identify as.
Definition at line 74 of file AbstractSmtpTransport.php.
References $_domain.
getSourceIp | ( | ) |
Returns the IP used to connect to the destination.
Definition at line 94 of file AbstractSmtpTransport.php.
References $_sourceIp.
isStarted | ( | ) |
Test if an SMTP connection has been established.
Implements Swift_Transport.
Definition at line 133 of file AbstractSmtpTransport.php.
References $_started.
registerPlugin | ( | Swift_Events_EventListener | $plugin | ) |
Register a plugin.
Swift_Events_EventListener | $plugin |
Implements Swift_Transport.
Definition at line 238 of file AbstractSmtpTransport.php.
reset | ( | ) |
Reset the current mail transaction.
Definition at line 246 of file AbstractSmtpTransport.php.
References executeCommand().
Referenced by _doMailTransaction(), and _getReversePath().
send | ( | Swift_Mime_Message | $message, |
& | $failedRecipients = null |
||
) |
Send the given Message.
Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.
Swift_Mime_Message | $message | |
string[] | $failedRecipients An array of failures by-reference |
Implements Swift_Transport.
Definition at line 149 of file AbstractSmtpTransport.php.
References _getReversePath(), _sendBcc(), _sendTo(), _throwException(), elseif, Swift_Mime_Message\generateId(), Swift_Mime_Message\getBcc(), Swift_Mime_Message\getCc(), Swift_Mime_Message\getTo(), Swift_Events_SendEvent\RESULT_FAILED, Swift_Events_SendEvent\RESULT_SUCCESS, Swift_Events_SendEvent\RESULT_TENTATIVE, and Swift_Mime_Message\setBcc().
setLocalDomain | ( | $domain | ) |
Set the name of the local domain which Swift will identify itself as.
This should be a fully-qualified domain name and should be truly the domain you're using.
If your server doesn't have a domain name, use the IP in square brackets (i.e. [127.0.0.1]).
string | $domain |
Definition at line 62 of file AbstractSmtpTransport.php.
setSourceIp | ( | $source | ) |
Sets the source IP.
string | $source |
Definition at line 84 of file AbstractSmtpTransport.php.
start | ( | ) |
Start the SMTP connection.
Implements Swift_Transport.
Definition at line 102 of file AbstractSmtpTransport.php.
References _doHeloCommand(), _getBufferParams(), _readGreeting(), and _throwException().
stop | ( | ) |
Stop the SMTP connection.
Implements Swift_Transport.
Definition at line 205 of file AbstractSmtpTransport.php.
References _throwException(), and executeCommand().
Referenced by __destruct().
|
protected |
Input-Output buffer for sending/receiving SMTP commands and responses
Definition at line 19 of file AbstractSmtpTransport.php.
Referenced by getBuffer().
|
protected |
The domain name to use in HELO command
Definition at line 25 of file AbstractSmtpTransport.php.
Referenced by getLocalDomain().
|
protected |
The event dispatching layer
Definition at line 28 of file AbstractSmtpTransport.php.
|
protected |
|
protected |
Connection status
Definition at line 22 of file AbstractSmtpTransport.php.
Referenced by isStarted().