Hi,
Just for the record and in order to close this case. It seems that the issue was caused by the server.
Changing the "Sendmail usage policy" in Plesk,
from "Default server-wide settings (Sendmail is not allowed) ",
to " Custom settings for the subscription - Allow using Sendmail for scripts and users on this subscription"
and also,
clicking on " Allow using Sendmail for scripts and users on this subscription (Scripts and users will be able to send email messages (on behalf of the subscription's system user) by using Sendmail even if the limits for a mailbox and domain are exceeded. The maximum number of messages that can be sent through Sendmail will be defined by the limit for an entire subscription.)", made it work.
Thanks