Jump to content

How to include external class


Recommended Posts

I'm trying to use "PHPMailerAutoload" class with Processwire.

When I include class "include_once("./PHPMailerAutoload.php");" and call it in my code "$mail = new PHPMailer();" i get an error:

<p style='background:crimson;color:white;padding:0.5em;font-family:sans-serif;'><b>Error:     Class 'ProcessWire\PHPMailer' not found (line 24 of /Applications/MAMP/htdocs/vm-pw-react/server/site/templates/contact.php) </b><br /><br /><small>This error message was shown because: you are logged in as a Superuser. Error has been logged. </small></p>


How do I load and use the class?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...