This repository has been archived by the owner on Jun 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
start.php
49 lines (39 loc) · 1.49 KB
/
start.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?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.
*/
/*
* Autoloader and dependency injection initialization for Swift Mailer.
*/
if (defined('SWIFT_REQUIRED_LOADED'))
{
return;
}
define('SWIFT_REQUIRED_LOADED', true);
// Load Swift utility class
require __DIR__.DS.'swiftmailer'.DS.'classes'.DS.'Swift.php';
// Start the autoloader
Swift::registerAutoload();
// Load the init script to set up dependency injection
require __DIR__.DS.'swiftmailer'.DS.'swift_init.php';
// Register the native quoted printable encoder to achieve much better
// performance. This requires PHP 5.3, but since this is a Laravel bundle
// I think it's safe to assume that that shouldn't be a problem.
Swift::init(function()
{
Swift_DependencyContainer::getInstance()
->register('mime.qpcontentencoder')
->asAliasOf('mime.nativeqpcontentencoder');
});
// Map the Message classes.
Autoloader::map(array(
'Message' => __DIR__.DS.'libraries'.DS.'message.php',
'Swiftmailer\\Drivers\\Driver' => __DIR__.DS.'libraries'.DS.'message'.DS.'drivers'.DS.'driver.php',
'Swiftmailer\\Drivers\\SMTP' => __DIR__.DS.'libraries'.DS.'message'.DS.'drivers'.DS.'smtp.php',
'Swiftmailer\\Drivers\\Sendmail' => __DIR__.DS.'libraries'.DS.'message'.DS.'drivers'.DS.'sendmail.php',
'Swiftmailer\\Drivers\\Mail' => __DIR__.DS.'libraries'.DS.'message'.DS.'drivers'.DS.'mail.php',
));