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:----hq/VKV5swEku31i/272XYtZ7dx9RpPPsto2zONO2QLXdZQJtqaXr2jqnWvIi2NLCNAsYZrbc7Q0Audciq1rMCRmUOYqeMskeEpoCpQZ8yL1aq66z7nMMwmA3gdp63gkxc1JywFC9eTyWqRrzgdKTXaPX42mTPHRkbaepLizC/CfG3r1Gqk4IPINAERSmrD5qZZNQLtvyyJZWaMCqOytiKWPmWyu99By5TNSNi1/zs1G7bxP5dJVWDS93QxnKc7Tvff9WhELXecvGlB3fwRpz/sObVIUzPfQknmpZ1fIyneTZUPWopM6pxYcE0vh2mX2E5ANVvna3CuZ1san0YClzbHelPmCrktFBmSCwmQo1BLilQp1YbK9kxX+k8ZvCmJMdYrkBe1oag5MMZfajd75+g2xsiIwtIP2wtK7cIfjiSYkoaoQ+vwLUyPR0V+xbzJoKfoTg7z1cV0977N2lIeppt3QHPH5okCIQrxQlNgzEVVcwOyiFl8RMO55xKXRD0ksMIcUDwj3jd4NoRBGFH6Anom+ollhLDqrN55J7ORFsfrUc8vhEmWp6K+8Y7mrc2iwTSB9mSokYEKwf+a13v3mC0sU0MNjxcMsdIkJuKFSzQiS7XrN2alGsALJKX/tU3c94xOKSxbS3bSpET8bqEtN/CehInMNiPQCfSJBeHUb5HLo=----ATTACHMENT:----MjU2NzU5NDE5NDMzNTQ1NSAyOTc2Nzg3NjE3MTI5NTc4IDMzNDkxMDIwNTc3NTY5OQ==