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

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
myyellowshoe
Forum Newbie
Posts: 2
Joined: Wed Aug 27, 2008 11:16 am

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

Post 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
User avatar
ghurtado
Forum Contributor
Posts: 334
Joined: Wed Jul 23, 2008 12:19 pm

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

Post by ghurtado »

As the error says, you also have to load the swift_connection_smtp class, via its own separate include.
myyellowshoe
Forum Newbie
Posts: 2
Joined: Wed Aug 27, 2008 11:16 am

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

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