1

I need email facility in the SpringBoot application that I am writing, however the following dependency when specified in pom.xml downloads an empty jar with no java code:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>

What is the wayout?

Singam
  • 443
  • 3
  • 12
  • Maybe the answer to [this topic](https://stackoverflow.com/questions/33213060/sending-email-via-spring-boot-spring-boot-starter-mail) can help you. They suggest using another library. – D-FENS Dec 04 '21 at 22:46
  • Spring Boot Starters don't have code (at least the ones directly from the Spring Boot project), but just pull in other necessary dependencies. The necessary auto configuration classes are already part of the core Spring Boot jars. – dunni Dec 04 '21 at 23:22
  • Well. as long as the code works, I won't complain. Unfortunately, the code gives compilation error because the library packages are simply not accessible/available. – Singam Dec 05 '21 at 11:06
  • @roccobaroccoSC. Thanks for pointing to the alternative. I will give it a go! But what baffles me is that I have been following these tutorials from reputed authors, https://www.baeldung.com/spring-email and https://mkyong.com/spring-boot/spring-boot-how-to-send-email-via-smtp/ and these articles both make reference to 'spring-boot-starter-mail' dependency. – Singam Dec 05 '21 at 11:10
  • It worked as per this tutorial. https://www.codejava.net/frameworks/spring-boot/email-sending-tutorial – Singam Dec 08 '21 at 07:58

0 Answers0