Email are sent successfully in local. But the problem occurs in production server that shows an error: unknown gmail configuration.
My email configuration looks like:
'gmail' => [
'className' => 'Smtp',
// The following keys are used in SMTP transports
'host' => 'ssl://smtp.gmail.com',
'port' => 465,
'timeout' => 60,
'username' => '[email protected]',
'password' => 'xxxxxxxxxxxxxxxxxxxxx',
'client' => null,
'tls' => true,
]
What is the problem and how can I fix this problem?
2
Answers
You can use these in your controller
Make sure app.php file on your production server contains required configuration. app.php is ignored by git by default, so it might not get deployed in your case as you are expecting.