-
Notifications
You must be signed in to change notification settings - Fork 41.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spring-mail 3.2.5 intermittent error from HELO/EHLO #44646
Comments
Spring Boot 3.2.x is no longer supported. Please upgrade to a supported version (3.3.x or later). If the problem remains, please provide a complete yet minimal sample that reproduces the problem. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Thank you for following up on this! I'm working on upgrading the application to Spring Boot 3.4 but it's taking longer than I expected with all the dependencies. I'll try to reproduce the issue with Spring Boot 3.4, but since the issue seemed to be intermittent and specific to one of deployment environment, I understand if this has to be closed for now in 7 days. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
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: