Hi All,
Having the issue,
Cannot add the Phalcon mailer and use it in the project,
Doing same that instructions says .
I have config linking to 'libraryDir' => APP_PATH . '/app/lib/'
in the lib folder I have a Mailer folder where I put the composer.json
, folowed https://github.com/phalcon-ext/mailer
But after using the lib in the Controller I've got
Fatal error</b>: Uncaught Error: Class 'Phalcon\Ext\Mailer\Manager'
Code :
use Phalcon\Http\Response;
use Phalcon\Mvc\Model\Criteria;
use Phalcon\Mvc\Model\Query\BuilderInterface;
use Phalcon\Di\InjectionAwareInterface;
use Phalcon\Mvc\Model\Resultset;
use Phalcon\Ext\Mailer\Manager;
use Phalcon\Ext\Mailer\Message;
class EmailController extends Phalcon\Mvc\Controller
{
public function initialize() {
if ($this->request->isPost()) {
$this->view->disable();
}
}
public function indexAction() {
}
public function sendEmailAction(){
if ($this->request->isPost()) {
$config = [
'driver' => 'mail',
'from' => [
'email' => '[email protected]',
'name' => 'Email'
]
];
$email = new Phalcon\Ext\Mailer\Message($config);
return "send";
}
}
}