Question

I'm able to get this plugin works after hours. But my problem now is that it didn't send the verification email.

this is my email.php config. I don't know how to set this up. So I just follow what others are doing.

class EmailConfig {

public $default = array(
    'transport' => 'Smtp',
    'from' => 'you@email.com',
    //'charset' => 'utf-8',
    //'headerCharset' => 'utf-8',
);

public $smtp = array(
    'transport' => 'Smtp',
    'from' => array('site@test.com' => '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@email.com',
    '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',
);
}

Can anybody tell me how to make this thing right meaning that it send verification email?

Was it helpful?

Solution 2

It looks like your email.php config file is badly misconfigured.

Most likely CakeEmail is using $default, which you have setup as follows:

public $default = array(
    'transport' => 'Smtp',
    'from' => 'you@email.com',
    //'charset' => 'utf-8',
    //'headerCharset' => 'utf-8',
);

Basically you are setting transport to SMTP and you are missing all the necessary configuration to have it working.

So, you should set your transport to Mail as this:

public $default = array(
    'transport' => 'Mail',
    'from' => 'you@yourdomain.com',
);

CakeDC most likely is using default as the following:

$Email = new CakeEmail('default');

Then it should work....

OTHER TIPS

Looks like you don't have an email server configured in your windows environment.

If you want to debug emails being sent you could use the Debug Transport this way

public $default = array(
    'transport' => 'Debug',
    'from' => 'you@email.com',
    'log' => 'email',
);

Then check email output written to file app/tmp/logs/email.log

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top