classes/Swift/AWSTransport.php
/**
		* 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.
		*
		* @param Swift_Mime_SimpleMessage $message
		* @param string[] &$failedRecipients to collect failures by-reference
		* @return int
		* @throws AWSConnectionError
		*/
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.

@param Swift_Mime_SimpleMessage $message
@param string[] &$failedRecipients to collect failures by-reference
@return int
@throws AWSConnectionError
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 . @param Swift_Mime_SimpleMessage $message @param string [] &$failedRecipients to collect failures by - reference @return int @throws AWSConnectionError
public function send( Swift_Mime_SimpleMessage $message, &$failedRecipients = null ) {
			if ($evt = $this->_eventDispatcher->createSendEvent($this, $message))
			{
				$this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed');
				if ($evt->bubbleCancelled())
				{
					return 0;
				}
			}
			$this->response = $this->_doSend($message, $failedRecipients);
			$this->_debug("=== Start AWS Response ===");
			$this->_debug($this->response->body);
			$this->_debug("=== End AWS Response ===");
			$success = (200 == $this->response->code);
			if ($respEvent = $this->_eventDispatcher->createResponseEvent($this, new Swift_Response_AWSResponse( $message, $this->response->xml, $success ), $success))
				$this->_eventDispatcher->dispatchEvent($respEvent, 'responseReceived');
			if ($evt)
			{
				$evt->setResult($success ? Swift_Events_SendEvent::RESULT_SUCCESS : Swift_Events_SendEvent::RESULT_FAILED);
				$this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed');
			}
			if( $success ) {
				return count((array) $message->getTo());
			}
			else {
				return 0;
			}
		}
public function send ( Swift_Mime_SimpleMessage $ message , & $ failedRecipients = null ) { if ( $ evt = $ this -> _eventDispatcher -> createSendEvent ( $ this , $ message ) ) { $ this -> _eventDispatcher -> dispatchEvent ( $ evt , 'beforeSendPerformed' ) ; if ( $ evt -> bubbleCancelled ( ) ) { return 0 ; } } $ this -> response = $ this -> _doSend ( $ message , $ failedRecipients ) ; $ this -> _debug ( " === Start AWS Response === " ) ; $ this -> _debug ( $ this -> response -> body ) ; $ this -> _debug ( " === End AWS Response === " ) ; $ success = ( 200 == $ this -> response -> code ) ; if ( $ respEvent = $ this -> _eventDispatcher -> createResponseEvent ( $ this , new Swift_Response_AWSResponse ( $ message , $ this -> response -> xml , $ success ) , $ success ) ) $ this -> _eventDispatcher -> dispatchEvent ( $ respEvent , 'responseReceived' ) ; if ( $ evt ) { $ evt -> setResult ( $ success ? Swift_Events_SendEvent :: RESULT_SUCCESS : Swift_Events_SendEvent :: RESULT_FAILED ) ; $ this -> _eventDispatcher -> dispatchEvent ( $ evt , 'sendPerformed' ) ; } if ( $ success ) { return count ( ( array ) $ message -> getTo ( ) ) ; } else { return 0 ; } }
Send the given Message.
Send the given Message .
/** @var bool $success */