summaryrefslogtreecommitdiff
path: root/vendor/swiftmailer/classes/Swift/Mailer.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/Mailer.php
parent850645dd6b22f5b495d1680e0b49540e0ebf9bd3 (diff)
Switch to composer
Diffstat (limited to 'vendor/swiftmailer/classes/Swift/Mailer.php')
-rw-r--r--vendor/swiftmailer/classes/Swift/Mailer.php114
1 files changed, 0 insertions, 114 deletions
diff --git a/vendor/swiftmailer/classes/Swift/Mailer.php b/vendor/swiftmailer/classes/Swift/Mailer.php
deleted file mode 100644
index 5677fcb4..00000000
--- a/vendor/swiftmailer/classes/Swift/Mailer.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/*
- * This file is part of SwiftMailer.
- * (c) 2004-2009 Chris Corbyn
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-/**
- * Swift Mailer class.
- *
- * @author Chris Corbyn
- */
-class Swift_Mailer
-{
- /** The Transport used to send messages */
- private $_transport;
-
- /**
- * Create a new Mailer using $transport for delivery.
- *
- * @param Swift_Transport $transport
- */
- public function __construct(Swift_Transport $transport)
- {
- $this->_transport = $transport;
- }
-
- /**
- * Create a new Mailer instance.
- *
- * @param Swift_Transport $transport
- *
- * @return Swift_Mailer
- */
- public static function newInstance(Swift_Transport $transport)
- {
- return new self($transport);
- }
-
- /**
- * Create a new class instance of one of the message services.
- *
- * For example 'mimepart' would create a 'message.mimepart' instance
- *
- * @param string $service
- *
- * @return object
- */
- public function createMessage($service = 'message')
- {
- return Swift_DependencyContainer::getInstance()
- ->lookup('message.'.$service);
- }
-
- /**
- * Send the given Message like it would be sent in a mail client.
- *
- * All recipients (with the exception of Bcc) will be able to see the other
- * recipients this message was sent to.
- *
- * Recipient/sender data will be retrieved from the Message object.
- *
- * The return value is the number of recipients who were accepted for
- * delivery.
- *
- * @param Swift_Mime_Message $message
- * @param array $failedRecipients An array of failures by-reference
- *
- * @return int
- */
- public function send(Swift_Mime_Message $message, &$failedRecipients = null)
- {
- $failedRecipients = (array) $failedRecipients;
-
- if (!$this->_transport->isStarted()) {
- $this->_transport->start();
- }
-
- $sent = 0;
-
- try {
- $sent = $this->_transport->send($message, $failedRecipients);
- } catch (Swift_RfcComplianceException $e) {
- foreach ($message->getTo() as $address => $name) {
- $failedRecipients[] = $address;
- }
- }
-
- return $sent;
- }
-
- /**
- * Register a plugin using a known unique key (e.g. myPlugin).
- *
- * @param Swift_Events_EventListener $plugin
- */
- public function registerPlugin(Swift_Events_EventListener $plugin)
- {
- $this->_transport->registerPlugin($plugin);
- }
-
- /**
- * The Transport used to send messages.
- *
- * @return Swift_Transport
- */
- public function getTransport()
- {
- return $this->_transport;
- }
-}