XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct (Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher) | |
__destruct () | |
executeCommand ($command, $codes=array(), &$failures=null) | |
getBuffer () | |
getLocalDomain () | |
isStarted () | |
registerPlugin (Swift_Events_EventListener $plugin) | |
reset () | |
send (Swift_Mime_Message $message, &$failedRecipients=null) | |
setLocalDomain ($domain) | |
start () | |
stop () | |
Protected Member Functions | |
_assertResponseCode ($response, $wanted) | |
_doDataCommand () | |
_doHeloCommand () | |
_doMailFromCommand ($address) | |
_doRcptToCommand ($address) | |
_getBufferParams () | |
_getFullResponse ($seq) | |
_getReversePath (Swift_Mime_Message $message) | |
_readGreeting () | |
_streamMessage (Swift_Mime_Message $message) | |
_throwException (Swift_TransportException $e) | |
Protected Attributes | |
$_buffer | |
$_domain = '[127.0.0.1]' | |
$_eventDispatcher | |
$_started = false | |
Private Member Functions | |
_doMailTransaction ($message, $reversePath, array $recipients, array &$failedRecipients) | |
_isFqdn ($hostname) | |
_lookupHostname () | |
_sendBcc (Swift_Mime_Message $message, $reversePath, array $bcc, array &$failedRecipients) | |
_sendCc (Swift_Mime_Message $message, $reversePath, array $cc, array &$failedRecipients) | |
_sendTo (Swift_Mime_Message $message, $reversePath, array $to, array &$failedRecipients) | |
Definition at line 26 of file AbstractSmtpTransport.php.
Swift_Transport_AbstractSmtpTransport::__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 51 of file AbstractSmtpTransport.php.
References _lookupHostname().
Swift_Transport_AbstractSmtpTransport::__destruct | ( | ) |
Destructor.
Definition at line 538 of file AbstractSmtpTransport.php.
References stop().
|
protected |
Throws an Exception if a response code is incorrect
Definition at line 392 of file AbstractSmtpTransport.php.
References _throwException().
Referenced by _readGreeting(), and executeCommand().
|
protected |
Send the DATA command
Definition at line 327 of file AbstractSmtpTransport.php.
References executeCommand().
Referenced by _doMailTransaction().
|
protected |
Send the HELO welcome
Definition at line 303 of file AbstractSmtpTransport.php.
References executeCommand().
Referenced by start().
|
protected |
Send the MAIL FROM command
Definition at line 311 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 437 of file AbstractSmtpTransport.php.
References _doDataCommand(), _doMailFromCommand(), _doRcptToCommand(), _streamMessage(), and reset().
Referenced by _sendBcc(), _sendCc(), and _sendTo().
|
protected |
Send the RCPT TO command
Definition at line 319 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 415 of file AbstractSmtpTransport.php.
References _throwException().
Referenced by _readGreeting(), and executeCommand().
|
protected |
Determine the best-use reverse path for this message
Definition at line 350 of file AbstractSmtpTransport.php.
References $from, $path, 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 522 of file AbstractSmtpTransport.php.
Referenced by _lookupHostname().
|
private |
Try to determine the hostname of the server this is run on
Definition at line 508 of file AbstractSmtpTransport.php.
References _isFqdn(), and elseif().
Referenced by __construct().
|
protected |
Read the opening SMTP greeting
Definition at line 297 of file AbstractSmtpTransport.php.
References _assertResponseCode(), and _getFullResponse().
Referenced by start().
|
private |
Send a message to all Bcc: recipients
Definition at line 493 of file AbstractSmtpTransport.php.
References _doMailTransaction(), and Swift_Mime_Message\setBcc().
Referenced by send().
|
private |
Send a message to the given Cc: recipients
Definition at line 481 of file AbstractSmtpTransport.php.
References _doMailTransaction().
Referenced by send().
|
private |
Send a message to the given To: recipients
Definition at line 469 of file AbstractSmtpTransport.php.
References _doMailTransaction().
Referenced by send().
|
protected |
Stream the contents of the message over the buffer
Definition at line 333 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 375 of file AbstractSmtpTransport.php.
Referenced by _assertResponseCode(), _getFullResponse(), _streamMessage(), Swift_Transport_SendmailTransport\send(), start(), and stop().
Swift_Transport_AbstractSmtpTransport::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 |
Definition at line 281 of file AbstractSmtpTransport.php.
References _assertResponseCode(), and _getFullResponse().
Referenced by _doDataCommand(), _doHeloCommand(), _doMailFromCommand(), _doRcptToCommand(), _streamMessage(), reset(), and stop().
Swift_Transport_AbstractSmtpTransport::getBuffer | ( | ) |
Get the IoBuffer where read/writes are occurring.
Definition at line 265 of file AbstractSmtpTransport.php.
References $_buffer.
Referenced by Swift_Transport_SendmailTransport\send().
Swift_Transport_AbstractSmtpTransport::getLocalDomain | ( | ) |
Get the name of the domain Swift will identify as.
Definition at line 78 of file AbstractSmtpTransport.php.
References $_domain.
Swift_Transport_AbstractSmtpTransport::isStarted | ( | ) |
Test if an SMTP connection has been established.
Implements Swift_Transport.
Definition at line 124 of file AbstractSmtpTransport.php.
References $_started.
Swift_Transport_AbstractSmtpTransport::registerPlugin | ( | Swift_Events_EventListener | $plugin | ) |
Register a plugin.
Swift_Events_EventListener | $plugin |
Implements Swift_Transport.
Definition at line 247 of file AbstractSmtpTransport.php.
Swift_Transport_AbstractSmtpTransport::reset | ( | ) |
Reset the current mail transaction.
Definition at line 255 of file AbstractSmtpTransport.php.
References executeCommand().
Referenced by _doMailTransaction(), and _getReversePath().
Swift_Transport_AbstractSmtpTransport::send | ( | Swift_Mime_Message | $message, |
& | $failedRecipients = null |
||
) |
Send the given Message.
Recipient/sender data will be retreived from the Message API. The return value is the number of recipients who were accepted for delivery.
Swift_Mime_Message | $message | |
string[] | &$failedRecipients to collect failures by-reference |
Implements Swift_Transport.
Definition at line 139 of file AbstractSmtpTransport.php.
References _getReversePath(), _sendBcc(), _sendCc(), _sendTo(), 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().
Swift_Transport_AbstractSmtpTransport::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 67 of file AbstractSmtpTransport.php.
Swift_Transport_AbstractSmtpTransport::start | ( | ) |
Start the SMTP connection.
Implements Swift_Transport.
Definition at line 86 of file AbstractSmtpTransport.php.
References _doHeloCommand(), _getBufferParams(), _readGreeting(), and _throwException().
Swift_Transport_AbstractSmtpTransport::stop | ( | ) |
Stop the SMTP connection.
Implements Swift_Transport.
Definition at line 206 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 31 of file AbstractSmtpTransport.php.
Referenced by getBuffer().
|
protected |
The domain name to use in HELO command
Definition at line 37 of file AbstractSmtpTransport.php.
Referenced by getLocalDomain().
|
protected |
The event dispatching layer
Definition at line 40 of file AbstractSmtpTransport.php.
|
protected |
Connection status
Definition at line 34 of file AbstractSmtpTransport.php.
Referenced by isStarted().