OVHcloud Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Error sending mail from web hosting


#1

Hello everybody.
I state that I am using Laravel and that from the local it all works correctly.
when I try to send an email with a php script it gives me the following error:
Connection could not be established with host smtp.autoscuolegentile.it: stream_socket_client (): unable to connect to smtp.xxxxxxx.it:25 (Connection timed out).

the configuration of the .env file:
MAIL_MAILER = smtp
MAIL_HOST = smtp.xxxxxxx.it
MAIL_PORT = 25
MAIL_USERNAME=xxxxx@xxxxxx.it
MAIL_PASSWORD = xxxxxx;
MAIL_ENCRYPTION = null
MAIL_FROM_ADDRESS=xxxxx@xxxxxx.it
MAIL_FROM_NAME = “$ {APP_NAME}”

thank you