Posted on by | Posted in Developer Blog

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:

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

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

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

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



Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.