Which artifact for org.springframework.mail? Which artifact for org.springframework.mail? java java

Which artifact for org.springframework.mail?


The mail stuff is found, rather bizarrely, in the context-support artifact.


 <!-- ########### SPRING-CONTEXT-SUPPORT ############ -->        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-context-support</artifactId>            <version>3.0.5.RELEASE</version>        </dependency>


For using MailSender and SimpleMailMessage through Spring you can use these imports in your code:

import org.springframework.mail.MailSender;import org.springframework.mail.SimpleMailMessage;

And add their jars in your project.

Otherwise if you are using maven then you have to make these imports in your source and then add dependencies :

  1. http://mvnrepository.com/artifact/org.springframework/spring-support/2.0.6
  2. http://mvnrepository.com/artifact/org.springframework/spring-context-support/3.2.0.RELEASE

You will get the mail support from both of them.