When i put all code from testing server to live server., I got an error while sending email.
{ "message": "Network is unreachable", "url": "\/api\/users\/emailSheets", "code": 500, "file": "domainname.com/vendor\/cakephp\/cakephp\/src\/Network\/Socket.php", "line": 179 }
What is the problem on live server ?
In my app.php
'EmailTransport' => [
'default' => [
'className' => 'Mail',
// The following keys are used in SMTP transports
'host' => 'localhost',
'port' => 25,
'timeout' => 30,
'username' => 'user',
'password' => 'secret',
'client' => null,
'tls' => null,
'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
],
'gmail'=> [
'host' => 'ssl://smtp.gmail.com',
'port' => 465,
'username' => 'my@gmail.com', //your gmail address
'password' => '123453', //your gmail password
'className' => 'Smtp',
'log' => true,
'context' => [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
]
]
],
]