Error sending email <test>: error connecting to server - 6.33.5

Dear All

I had problems to send emails.

The configuration from “Tools-Emails” work correctly with 25 port and 587 but I can not send a single email from terminal to check it, and I got the message “Error sending email : error connecting to server”

I get a correct ping to smtp from Terminal

If I try to use the button “send email” from emails settings work correctly but not with single code :

/tool e-mail send to=“XXX@domain.XXX” subject=“test” body=“hello”

I hope you can help me
Thanks