My strict mail server refuses “localhost” on the submission port. Can you send the host part of the sender as the EHLO host/domain?
If I’m sending mail from me@example,com, first send EHLO example,com (replace coma for dots). Other mail clients do that and it helps.
delta.chat sends EHLO localhost