PATH:
home
/
lab2454c
/
bancmils.com
/
vendor
/
swiftmailer
/
swiftmailer
/
lib
/
classes
/
Swift
<?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. */ public function __construct(Swift_Transport $transport) { $this->transport = $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 array $failedRecipients An array of failures by-reference * * @return int The number of successful recipients. Can be 0 which indicates failure */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $failedRecipients = (array) $failedRecipients; // FIXME: to be removed in 7.0 (as transport must now start itself on send) 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). */ 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; } }
[-] LoadBalancedTransport.php
[edit]
[-] KeyCache.php
[edit]
[-] Message.php
[edit]
[-] FileStream.php
[edit]
[+]
Mailer
[+]
Transport
[-] InputByteStream.php
[edit]
[+]
..
[+]
CharacterReaderFactory
[-] DependencyException.php
[edit]
[-] Encoder.php
[edit]
[-] Filterable.php
[edit]
[-] DependencyContainer.php
[edit]
[-] MimePart.php
[edit]
[-] SendmailTransport.php
[edit]
[-] SmtpTransport.php
[edit]
[-] SpoolTransport.php
[edit]
[-] Spool.php
[edit]
[-] FailoverTransport.php
[edit]
[+]
CharacterReader
[-] ReplacementFilterFactory.php
[edit]
[-] Attachment.php
[edit]
[+]
Signers
[+]
Events
[-] Image.php
[edit]
[-] Transport.php
[edit]
[-] CharacterStream.php
[edit]
[-] EmbeddedFile.php
[edit]
[-] Signer.php
[edit]
[-] RfcComplianceException.php
[edit]
[-] SwiftException.php
[edit]
[-] OutputByteStream.php
[edit]
[-] IoException.php
[edit]
[+]
KeyCache
[+]
Mime
[-] MemorySpool.php
[edit]
[-] TransportException.php
[edit]
[-] .htaccess
[edit]
[+]
Plugins
[-] NullTransport.php
[edit]
[-] AddressEncoderException.php
[edit]
[-] StreamFilter.php
[edit]
[-] FileSpool.php
[edit]
[-] CharacterReaderFactory.php
[edit]
[-] ConfigurableSpool.php
[edit]
[+]
StreamFilters
[-] CharacterReader.php
[edit]
[+]
Encoder
[+]
CharacterStream
[+]
ByteStream
[-] Mailer.php
[edit]
[-] Preferences.php
[edit]
[-] AddressEncoder.php
[edit]
[-] IdGenerator.php
[edit]
[+]
AddressEncoder