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

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
Stacks
Forum Newbie
Posts: 24
Joined: Thu Jun 05, 2008 7:52 pm

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

Post 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?
Post Reply