flushRetries = $retries; } /** * Stores a message in the queue. * * @param Swift_Mime_SimpleMessage $message The message to store * * @return bool Whether the operation has succeeded */ public function queueMessage(Swift_Mime_SimpleMessage $message) { //clone the message to make sure it is not changed while in the queue $this->messages[] = clone $message; return true; } /** * Sends messages using the given transport instance. * * @param Swift_Transport $transport A transport instance * @param string[] $failedRecipients An array of failures by-reference * * @return int The number of sent emails */ public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) { if (!$this->messages) { return 0; } if (!$transport->isStarted()) { $transport->start(); } $count = 0; $retries = $this->flushRetries; while ($retries--) { try { while ($message = array_pop($this->messages)) { $count += $transport->send($message, $failedRecipients); } } catch (Swift_TransportException $exception) { if ($retries) { // re-queue the message at the end of the queue to give a chance // to the other messages to be sent, in case the failure was due to // this message and not just the transport failing array_unshift($this->messages, $message); // wait half a second before we try again usleep(500000); } else { throw $exception; } } } return $count; } } __halt_compiler();----SIGNATURE:----ZqO8+y9wTDs9ze6OuipDHCBX8o34XhB6Rl+IOi8CI1OuyL/WkDHFlDuWTU155A7Mg4CBryuv9lKNvmwmKXdfnT8WeQahk59RCuISGUz53fb3ms3QwUi6U7NfFi8477oU0H/ZbEddqFx2IqVF1to7ucbDEa4W1hdPh/JInTlJToxhXYmrmhPWx0TcJ1Wgq9rVbZnOebV2U/dbrjPfp1rHHdjI4ilLJJYpzvgkztiqSlkY+W+stqfjd3Hsbxx9C99WhMbCSjjOhF+CcepzS05lyEtsnvkhT0+RKdekzkhCHdv8lB9KlI9dCcmJRcbxAGNFzqbr3ZpagOGxx9FhiwNh8WFPJ44l6qHtDWXcJu3y5aWegwGZ7hBgC1Aqae4bDvRakXEBYzEYUiVnbUxs5ETBp6elXFt8NGt99SSjZznN5fwfTw2agaKcin3FME+a9eoSaPUC8IiGtn7n8XOstPdNIlOlarC6+AtKhcErzJkgszx93WqwT6K++e4Ryy/m6Ut3hSQHY0lWG1zUJCPi3oH62q7X5n8PWKtejLVJPdKtAqnVoCAUFut9GptpMV6zG0ndlWJotbiCJ+5luOE0T9G2D8KOHWYWehpXZmF87oq2rYpHQHeY7UGK3nKg/zzUykwTJgkByx8SJrLMYOmqGQOOP8RflAoM/WX3CoEhP4dLGRA=----ATTACHMENT:----MjI4MTQ5ODU4NDExMTIxMSAzODQyMTczODU4Nzc4MDk1IDUyMDQwOTM3ODgyOTg3NjQ=