java.lang.IllegalStateException: No recipient has been provided on the MailMessage or the 'MailHeaders.TO' header.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

If you're using boot 1.4.x you need to modify the @springBootTest annotation to @SpringBootTest(classes = DataFlowServerConfiguration.class). 1.3.8 doesn't have this problem as well.

,
Expert tip

Spring Boot 1.4 changed their annotation system a little. Try using the @SpringBootApplication annotation for better results.

Solutions on the web

via Stack Overflow by shuvam
, 1 year ago
Message contained wrong job instance id [9331] should have been [9332].
via Stack Overflow by user3278695
, 8 months ago
Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
java.lang.IllegalStateException: No recipient has been provided on the MailMessage or the 'MailHeaders.TO' header.
at org.springframework.integration.mail.MailSendingMessageHandler.applyHeadersToMailMessage(MailSendingMessageHandler.java:132)
at org.springframework.integration.mail.MailSendingMessageHandler.convertMessageToMailMessage(MailSendingMessageHandler.java:99)
at org.springframework.integration.mail.MailSendingMessageHandler.handleMessage(MailSendingMessageHandler.java:69)

Users with the same issue

3 times, 10 months ago
4 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 6 months ago
8 times, 9 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.