php - cant send an email on cakephp3 -
i can't cakephp3 send emails. in cakephp2 no problem. using latest wamp, , cakephp3.3 on windows 7. tried follow directions looks getting basic wrong. need configure wamp checked php.ini
-development file there no smtp entry change
error- stream_socket_client(): ssl operation failed code 1. openssl error messages: error:14090086:ssl routines:ssl3_get_server_certificate:certificate verify failed stream_socket_client(): failed enable crypto stream_socket_client(): unable connect ssl://smtp.gmail.com:465 (unknown error)
controller public function singletutoremail(){ $email = new email(); $email->transport('gmail3'); $to='jjxxx@gmail.com'; $subject='testing'; $message='hello, dfsfsdfsdf sdfsdf'; $email->from(['jjxxx@gmail.com' => 'test']) ->to($to) ->subject( $subject) ->send($message); } in app.php 'emailtransport' => [ 'default' => [ 'classname' => 'mail', // following keys used in smtp transports 'host' => 'localhost', 'port' => 465, 'timeout' => 30, 'username' => 'user', 'password' => 'secret', 'client' => null, 'tls' => null, 'url' => env('email_transport_default_url', null), ], 'gmail3' => [ 'classname' => 'smtp', 'host' => 'ssl://smtp.gmail.com', 'port' => 465, 'timeout' => 30, 'username' => 'jjxxx@gmail.com', 'password' => 'xxx', 'client' => null, 'context' => [ 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ] ] ], ],
http://book.cakephp.org/3.0/en/core-libraries/email.html
sending mail using cakephp 3.0
Comments
Post a Comment