forked from Wavyzz/dolibarr
swiftmailer
This commit is contained in:
@@ -8,23 +8,15 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Autoloader and dependency injection initialization for Swift Mailer.
|
||||
*/
|
||||
require __DIR__.'/classes/Swift.php';
|
||||
|
||||
if (class_exists('Swift', false)) {
|
||||
return;
|
||||
}
|
||||
Swift::registerAutoload(function () {
|
||||
// Load in dependency maps
|
||||
require __DIR__.'/dependency_maps/cache_deps.php';
|
||||
require __DIR__.'/dependency_maps/mime_deps.php';
|
||||
require __DIR__.'/dependency_maps/message_deps.php';
|
||||
require __DIR__.'/dependency_maps/transport_deps.php';
|
||||
|
||||
// Load Swift utility class
|
||||
require dirname(__FILE__).'/classes/Swift.php';
|
||||
|
||||
if (!function_exists('_swiftmailer_init')) {
|
||||
function _swiftmailer_init()
|
||||
{
|
||||
require dirname(__FILE__).'/swift_init.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Start the autoloader and lazy-load the init script to set up dependency injection
|
||||
Swift::registerAutoload('_swiftmailer_init');
|
||||
// Load in global library preferences
|
||||
require __DIR__.'/preferences.php';
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user