I recently had a similar issue with using SMTP after switching off from using sendmail where the only reported error is as you described.
I don't know what is causing the error, but I did manage to work around it. Since I had sendmail working before, I reconfigured sendmail to use smtp and now...