spring-mail 3.2.5 intermittent error from HELO/EHLO #44646
Labels
status: waiting-for-feedback
We need additional information before we can continue
status: waiting-for-triage
An issue we've not yet triaged
Error description
Hello spring boot team,
I noticed intermittent error from my spring boot application that uses spring mail. When it sends mail, it sends HELO to 0:0:0:0:0:0:0:1, which is not the mail server configured and resulted in error

501 EHLO requires valid address
, even though it also logsSMTP: connected to host <my mail server>
. (see screenshot)I would get similar error caused by HELO from actuator health getting mail health:
Application specification
Java 17
Related libraries:
org.springframework.boot
gradle plugin, version3.2.5
io.spring.dependency-management
gradle plugin, version1.1.5
org.springframework.boot:spring-boot-starter-mail
dependency, version3.2.5
com.icegreen:greenmail
test dependency, version2.1.2
Spring Boot properties:
Beans:
I have a configuration for
JavaMailSender
beans:email-test
profile is used withgreenmail
in some mail related Spring Boot Test, and default profile is used in other Spring Boot Test.prod
andqa
are cloud profiles that should configureJavaMailSender
from Spring Boot properties.The behavior was intermittent because from time to time it was able to send mail. I read about the error online, and the remediation I found working was to set another mail property to the mail host:
I would like to know what caused this sudden change of intermittent error behavior. Please let me know if you need me to provide more information.
The text was updated successfully, but these errors were encountered: