1

So I'm using CakePHP 2.7 and implemented CakeDC's Users Plugin. I have it running as I am able to access different pages. I have also created the 'users' and 'user details' table using the schema shell.

My problem is that whenever I try to register an account, no E-mails are being sent.

class EmailConfig {

    public $default = array(
        'transport' => 'Mail',
        'from' => 'you@localhost',
        //'charset' => 'utf-8',
        //'headerCharset' => 'utf-8',
    );

    public $smtp = array(
        'transport' => 'Smtp',
        'from' => array('site@localhost' => 'My Site'),
        'host' => 'localhost',
        'port' => 25,
        'timeout' => 30,
        'username' => 'user',
        'password' => 'secret',
        'client' => null,
        'log' => false,
        //'charset' => 'utf-8',
        //'headerCharset' => 'utf-8',
    );

    public $fast = array(
        'from' => 'you@localhost',
        'sender' => null,
        'to' => null,
        'cc' => null,
        'bcc' => null,
        'replyTo' => null,
        'readReceipt' => null,
        'returnPath' => null,
        'messageId' => true,
        'subject' => null,
        'message' => null,
        'headers' => null,
        'viewRender' => null,
        'template' => false,
        'layout' => false,
        'viewVars' => null,
        'attachments' => null,
        'emailFormat' => null,
        'transport' => 'Smtp',
        'host' => 'localhost',
        'port' => 25,
        'timeout' => 30,
        'username' => 'user',
        'password' => 'secret',
        'client' => null,
        'log' => true,
        //'charset' => 'utf-8',
        //'headerCharset' => 'utf-8',
    );

}

Here's the email.php config. Can someone help me with this?

Thank you!

mark
  • 177
  • 3
  • 14
  • Are you working on a webserver or with a local server like WAMP or XAMPP? If you're on a local server you can try to use a SMTP configuration as PHP's sendmail might be disabled... – Oops D'oh Aug 18 '15 at 21:53
  • I am using XAMPP. Is there any additional configuration? If so can you point me in the right direction? Thank you! – mark Aug 19 '15 at 02:57
  • Checkout XAMPP/mailoutput or XAMPP/mailtodisk. Also search for [other posts](http://stackoverflow.com/questions/15965376/how-to-configure-xampp-to-send-mail-from-localhost) about this problem. I prefer to use a real SMTP server so the mails are send via an extern webserver (like Gmail in the linked post or the SMTP configuration of your own webspace/domain), because some email clients recognize mails that have been sent via PHP directly sometimes as spam... – Oops D'oh Aug 19 '15 at 16:10

0 Answers0