Skip to content

Failure analysis for a missing mail sender is misleading#49582

Merged
wilkinsona merged 2 commits into
spring-projects:4.0.xfrom
answndud:codex/mail-failure-analysis-49359
Mar 13, 2026
Merged

Failure analysis for a missing mail sender is misleading#49582
wilkinsona merged 2 commits into
spring-projects:4.0.xfrom
answndud:codex/mail-failure-analysis-49359

Conversation

@answndud
Copy link
Copy Markdown
Contributor

Summary

  • add a mail-specific failure analyzer for missing MailSender beans when mail auto-configuration does not match
  • provide guidance for configuring spring.mail.host or spring.mail.jndi-name instead of only suggesting a custom bean
  • add focused tests for the analyzer and register it in spring.factories

Testing

  • ./gradlew :module:spring-boot-mail:test --tests org.springframework.boot.mail.autoconfigure.NoSuchMailSenderBeanFailureAnalyzerTests

Fixes #49359

@answndud answndud force-pushed the codex/mail-failure-analysis-49359 branch from 1ae1b7b to d4b6339 Compare March 13, 2026 08:32
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 13, 2026
@wilkinsona wilkinsona changed the title Improve failure analysis when MailSender auto-configuration does not match Failure analysis for a missing mail sender is misleading Mar 13, 2026
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 13, 2026
@wilkinsona wilkinsona added this to the 4.0.x milestone Mar 13, 2026
@wilkinsona wilkinsona self-assigned this Mar 13, 2026
@wilkinsona wilkinsona changed the base branch from main to 4.0.x March 13, 2026 11:17
@wilkinsona wilkinsona force-pushed the codex/mail-failure-analysis-49359 branch from d4b6339 to f5f79b3 Compare March 13, 2026 11:19
wilkinsona added a commit to answndud/spring-boot that referenced this pull request Mar 13, 2026
@wilkinsona wilkinsona force-pushed the codex/mail-failure-analysis-49359 branch from f5f79b3 to a673109 Compare March 13, 2026 12:20
See spring-projectsgh-49582

Signed-off-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
@wilkinsona wilkinsona force-pushed the codex/mail-failure-analysis-49359 branch from a673109 to f0aff3a Compare March 13, 2026 12:24
@wilkinsona wilkinsona modified the milestones: 4.0.x, 4.0.4 Mar 13, 2026
@wilkinsona wilkinsona merged commit 7619c23 into spring-projects:4.0.x Mar 13, 2026
1 check passed
@wilkinsona
Copy link
Copy Markdown
Member

Thank you, @answndud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure analysis for a missing mail sender is misleading and should suggest setting the spring.mail.host property

3 participants