Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

manishchauhan's avatar

Laravel Mail stream_socket_client() error in production

Connection could not be established with host "ssl://smtp.gmail.com:465": stream_socket_client(): Unable to connect to ssl://smtp.gmail.com:465 (Connection timed out)

i deployed my project in the cPanel but facing mail error it completely working in local but when i deploy the project in cPanel return this error i try in both port 587 with tls and port 465 with ssl but not working is there any other issuse?

MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=465 MAIL_USERNAME=[email protected] MAIL_PASSWORD=password MAIL_ENCRYPTION=ssl MAIL_FROM_ADDRESS=[email protected] MAIL_FROM_NAME="APP Name"

0 likes
0 replies

Please or to participate in this conversation.