Java Mail Properties – esmtp authentication error

Last week, we had a problem with sending emails from our application. Currently we use the spring email integration to do this.
An esmtp server runs at customers side, which does not accept the default mail settings we made for our local test environment:

  <property name="host" value="${}"/>
  <property name="port" value="${mail.port}" />
  <property name="username" value="${mail.user}" />
  <property name="password" value="${mail.password}" />

Following property fixed the problem (after a long time of experimenting with different mail.smtp.* properties!):

<property name="javaMailProperties">
    <prop key="mail.smtp.localhost">mylocalhost</prop>
    <prop key="mail.smtp.ehlo">false</prop>

With these two settings you create at least the following command that is required to send the mails : helo mylocalhost