Skip to content

Errors with emails #373

Open
Open
@pirona

Description

Hello,

I have 2 errors which I think may be related :

1 - when creating a new user : impossible with following error

2019-09-04 13:26:32 Error: [ConfigureException] Unknown email configuration "default". Request URL: /users/add Stack Trace: #0 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Network/Email/CakeEmail.php(1154): CakeEmail->_applyConfig('default') #1 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Network/Email/CakeEmail.php(362): CakeEmail->config('default') #2 /var/www/sonerezh/app/Lib/Event/UsersEventListener.php(22): CakeEmail->__construct('default') #3 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Event/CakeEventManager.php(243): UsersEventListener->sendUserCreationEmail(Object(CakeEvent)) #4 /var/www/sonerezh/app/Model/User.php(123): CakeEventManager->dispatch(Object(CakeEvent)) #5 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Event/CakeEventManager.php(241): User->afterSave(true, Array) #6 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Model/Model.php(1970): CakeEventManager->dispatch(Object(CakeEvent)) #7 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Model/Model.php(1760): Model->_doSave(Array, Array) #8 /var/www/sonerezh/app/Controller/UsersController.php(51): Model->save(Array) #9 [internal function]: UsersController->add() #10 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(UsersController), Array) #11 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest)) #12 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(UsersController), Object(CakeRequest)) #13 /var/www/sonerezh/app/webroot/index.php(107): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse)) #14 {main} 2019-09-04 13:28:37 Warning: Warning (2): Missing argument 2 for App::uses(), called in /var/www/sonerezh/app/Config/email.php on line 42 and defined in [/var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Core/App.php, line 521] Trace: ErrorHandler::handleError() - APP/Vendor/cakephp/cakephp/lib/Cake/Error/ErrorHandler.php, line 230 App::uses() - APP/Vendor/cakephp/cakephp/lib/Cake/Core/App.php, line 521 include_once - APP/Config/email.php, line 42 config - APP/Vendor/cakephp/cakephp/lib/Cake/basics.php, line 50 CakeEmail::_applyConfig() - APP/Vendor/cakephp/cakephp/lib/Cake/Network/Email/CakeEmail.php, line 1246 CakeEmail::config() - APP/Vendor/cakephp/cakephp/lib/Cake/Network/Email/CakeEmail.php, line 1154 CakeEmail::__construct() - APP/Vendor/cakephp/cakephp/lib/Cake/Network/Email/CakeEmail.php, line 362 UsersEventListener::sendResetPasswordEmail() - APP/Lib/Event/UsersEventListener.php, line 43 CakeEventManager::dispatch() - APP/Vendor/cakephp/cakephp/lib/Cake/Event/CakeEventManager.php, line 243 UsersController::setResetPasswordToken() - APP/Controller/UsersController.php, line 204 ReflectionMethod::invokeArgs() - [internal], line ?? Controller::invokeAction() - APP/Vendor/cakephp/cakephp/lib/Cake/Controller/Controller.php, line 491 Dispatcher::_invoke() - APP/Vendor/cakephp/cakephp/lib/Cake/Routing/Dispatcher.php, line 193 Dispatcher::dispatch() - APP/Vendor/cakephp/cakephp/lib/Cake/Routing/Dispatcher.php, line 167 [main] - APP/webroot/index.php, line 107

2 - Error at password reset :

2019-09-04 13:28:37 Error: [ConfigureException] Unknown email configuration "default". Request URL: /users/setResetPasswordToken Stack Trace: #0 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Network/Email/CakeEmail.php(1154): CakeEmail->_applyConfig('default') #1 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Network/Email/CakeEmail.php(362): CakeEmail->config('default') #2 /var/www/sonerezh/app/Lib/Event/UsersEventListener.php(43): CakeEmail->__construct('default') #3 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Event/CakeEventManager.php(243): UsersEventListener->sendResetPasswordEmail(Object(CakeEvent)) #4 /var/www/sonerezh/app/Controller/UsersController.php(204): CakeEventManager->dispatch(Object(CakeEvent)) #5 [internal function]: UsersController->setResetPasswordToken() #6 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(UsersController), Array) #7 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest)) #8 /var/www/sonerezh/app/Vendor/cakephp/cakephp/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(UsersController), Object(CakeRequest)) #9 /var/www/sonerezh/app/webroot/index.php(107): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse)) #10 {main}
I created an email.php and gave same rights as the other files but nothing happens ..

Do you have an idea ?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions