email - PHP can't find class 'GhostMailer'
So i am trying to call some functions of a mailer class..
In phpStorm when i typeGhostMailer::setSender();
I can navigate to the file when i click my scroll button on theGhostMailer::
text to where GhostMailer is into, but whenever i run the program it says class GhostMailer not found..
Code for calling
GhostMailer::setSender(Input::get('emailfrom'));
GhostMailer::addRecipient(Input::get('emailto'));
GhostMailer::setSubject(Input::get('subject'));
GhostMailer::setHTML(true);
GhostMailer::setMessage(Input::get('email'));
GhostMailer::setReturnAddress(Input::get('emailfrom'));
GhostMailer::getHeaders();
GhostMailer::send();
How do i fix this?
Answer
Solution:
This sounds to me like the class (file) is not actually loaded and therefore the class doesn't exist at runtime.
Add
"app/classes"
, to theclassmap
array incomposer.json
and then runcomposer dump-autoload
and you should be good to go