Page 1 of 1

I would like to use SwiftMailer but my class autoloader...

Posted: Mon Nov 29, 2010 4:22 pm
by Stacks
is conflicting with swiftmailers autoloader.

When I tried to

Code: Select all

include($_SERVER['DOCUMENT_ROOT'] . "/Swift-4.0.6/lib/swift_required.php");
it would cause my class autoloader to stop working and my whole application to break.

Code: Select all

function __autoload($class_name) 
{
	require_once CLASSES_PATH.$class_name . '.cls.php';
}
So I tried to load the swift_init class.

Code: Select all

include($_SERVER['DOCUMENT_ROOT'] . "/Swift-4.0.6/lib/swift_init.php");
And now my autoloader is screwing it up because it's trying to look for the swift classes in my CLASSES_PATH.

Should I not be auto loading the classes in my application in this manner? Or can I do something here to make swiftmail work?