I followed some possible solutions (changing the code checker from 5.1.0 to 6.1.0)

upgrading the SMTP.PHP and Sochet.PHP files.

Opening the ports in my firewall.

even I opened a new account in a different mail server but nothing.

when I try with SSL this is the error:

Sending Email via SMTPFailed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) (code: -1, response: )]I spend 3 days looking for a solution, I don't know if is the OsTicket system, PHP configuration, Apache configuration or what else, my network is not, because a telnet connection to the SMTP server is succesful.I'm Desperate!