Page 1 of 1

Fatal error - can't instantiate non-existent class - ugh...

Posted: Wed Aug 27, 2008 11:27 am
by myyellowshoe
Hey guys,

So I am getting this error and I can't figure out for the life of me what is up.

Code: Select all

Fatal error: Cannot instantiate non-existent class: swift_connection_smtp in /nfs/c01/h03/mnt/32879/domains/prakprint.com/html/sendQuote.php on line 111
 
This is also running in php4 but I don't see why it wouldn't be working.

Here are my include paths. They are fine as far as I can tell.

Code: Select all

require_once("swift/Swift.php");
require_once("swift/Swift/Connection/NativeMail.php"); //There are various connections to use
 
I got the code from here (http://www.swiftmailer.org/wikidocs/v3/ ... /form2mail)


Whats up with this?

Thanks guys. :o

Re: Fatal error - can't instantiate non-existent class - ugh...

Posted: Wed Aug 27, 2008 2:47 pm
by ghurtado
As the error says, you also have to load the swift_connection_smtp class, via its own separate include.

Re: Fatal error - can't instantiate non-existent class - ugh...

Posted: Thu Aug 28, 2008 8:33 am
by myyellowshoe
Thanks for the quick reply ;)

There was an include that was missing from that tutorial so smtp can be used.

Code: Select all

require_once('swift/Swift/Connection/SMTP.php');
Once I added this everything went smoothly.
Thanks again!