summaryrefslogtreecommitdiff
path: root/vendor/swiftmailer/classes/Swift/MemorySpool.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-04 21:33:05 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-04 21:33:05 -0500
commit135b921db75da5995eab7e36393ecd4d2b0bc66f (patch)
tree46efc60fcf1f9d5c57ab1fb9418c2acfbda0698a /vendor/swiftmailer/classes/Swift/MemorySpool.php
parent850645dd6b22f5b495d1680e0b49540e0ebf9bd3 (diff)
Switch to composer
Diffstat (limited to 'vendor/swiftmailer/classes/Swift/MemorySpool.php')
-rw-r--r--vendor/swiftmailer/classes/Swift/MemorySpool.php83
1 files changed, 0 insertions, 83 deletions
diff --git a/vendor/swiftmailer/classes/Swift/MemorySpool.php b/vendor/swiftmailer/classes/Swift/MemorySpool.php
deleted file mode 100644
index fb705efc..00000000
--- a/vendor/swiftmailer/classes/Swift/MemorySpool.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-
-/*
- * This file is part of SwiftMailer.
- * (c) 2011 Fabien Potencier <fabien.potencier@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Stores Messages in memory.
- *
- * @author Fabien Potencier
- */
-class Swift_MemorySpool implements Swift_Spool
-{
- protected $messages = array();
-
- /**
- * Tests if this Transport mechanism has started.
- *
- * @return bool
- */
- public function isStarted()
- {
- return true;
- }
-
- /**
- * Starts this Transport mechanism.
- */
- public function start()
- {
- }
-
- /**
- * Stops this Transport mechanism.
- */
- public function stop()
- {
- }
-
- /**
- * Stores a message in the queue.
- *
- * @param Swift_Mime_Message $message The message to store
- *
- * @return bool Whether the operation has succeeded
- */
- public function queueMessage(Swift_Mime_Message $message)
- {
- $this->messages[] = $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;
- while ($message = array_pop($this->messages)) {
- $count += $transport->send($message, $failedRecipients);
- }
-
- return $count;
- }
-}