I am sending emails from my Laravel project. In the localhost it works perfectly but after makes the site live it gives the following error.
The connection could not be established with host smtp.googlemail.com:stream_socket_client(): Peer certificate CN=`whm001.smart1marketing.com' did not match expected CN=`smtp.googlemail.com'
I am using same google configuration settings in which I used in Laravel , I have tried clearing all caches, etc. but no solution
Following is .env file
MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=mymail@gmail.com
MAIL_PASSWORD=my password
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=noreply@smart1leads.com
MAIL_FROM_NAME='LifeLoveAndOtherThings'