Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7818105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:27:55+00:00 2026-06-02T06:27:55+00:00

In my user controller I added: App::uses(‘CakeEmail’, ‘Network/Email’); class UsersController extends AppController { function

  • 0

In my user controller I added:

App::uses('CakeEmail', 'Network/Email');
class UsersController extends AppController { 
      function sign_up() {
        $this->autoRender = false;
        $email = new CakeEmail('default');

        $email->template('sign_up');
        $email->emailFormat('html');
        $email->subject('Addience.com Sign Up');
        $email->to($this->request->query['email']);
        $email->viewVars(array('password' => $this->Password->generatePassword(), 'email' => $this->request->query['email'], 'key' => $this->Password->generateKey()));
        $email->send();
        $this->redirect('/');
    }

}

and my email.php config file looks like:

class EmailConfig {

    public $default = array(
        'host' => 'ssl://smtp.gmail.com',
        'port' => 465,
        'username' => 'xxx@gmail.com',
        'password' => 'xxx',
        'from' => array('support@xxx.com' => 'xxx'),
        'transport' => 'Smtp'
    );
}

However, I still getting:

Notice (8): Undefined index: email [APP\Controller\UsersController.php, line 311]

Notice (8): Undefined index: email [APP\Controller\UsersController.php, line 312]
You need specify one destination on to, cc or bcc.

Error: An Internal Error Has Occurred.
Stack Trace

#0 C:\xampp\htdocs\addience\Controller\UsersController.php(314): CakeEmail->send()
#1 [internal function]: UsersController->sign_up()
#2 C:\xampp\htdocs\cakephp-2.0.6\lib\Cake\Controller\Controller.php(473): ReflectionMethod->invokeArgs(Object(UsersController), Array)
#3 C:\xampp\htdocs\cakephp-2.0.6\lib\Cake\Routing\Dispatcher.php(104): Controller->invokeAction(Object(CakeRequest))
#4 C:\xampp\htdocs\cakephp-2.0.6\lib\Cake\Routing\Dispatcher.php(86): Dispatcher->_invoke(Object(UsersController), Object(CakeRequest), Object(CakeResponse))
#5 C:\xampp\htdocs\addience\webroot\index.php(98): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#6 {main}

Why?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:27:57+00:00Added an answer on June 2, 2026 at 6:27 am

    Easy,

    $this->request->query['email']
    

    was empty 🙂

    Thank you anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I added a Session controller to my application for user sign-in / sign-out, using
This is code that I have added in my vendors/xtcpdf.php file: <?php App::import('Vendor','tcpdf/tcpdf'); class
My app's root view controller supports any orientation but user can navigate to another
I have a controller user with a method login For some reason, when I
def filters = { forUser(controller:'user', action:'*') { before = { user=springSecurityService.getCurrentUser() log.info(came to filter
I've followed this answer to mock HttpContext, Request, Response and User and set Controller.ControllerContext
Currently my controller lets a user submit muliple links at a time. It collects
I have a controller action that checks this.User.Identity.IsAuthenticated What do you suggest how to
I have a controller like this : @Secured(['ROLE_USER','IS_AUTHENTICATED_FULLY']) def userprofile(){ def user = User.get(springSecurityService.principal.id)
In my controller, I check a condition to see if the user is allowed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.