email - PHP can't find class 'GhostMailer'

461

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?

512

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

People are also looking for solutions to the problem: php - LIKE Statement not Working Properly in PDO

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.