Which artifact for org.springframework.mail?

66,267

Solution 1

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

Solution 2

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

Solution 3

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.

Share:
66,267
Tadeusz Kopec for Ukraine
Author by

Tadeusz Kopec for Ukraine

Punishment for war criminals. Peace for Ukraine. Freedom and good leaders for Russia Middle-aged grumpy programmer. Ceased to contribute. Lurking metas and sometime writing something there. Some reasons explained here https://meta.stackoverflow.com/a/391472/113662

Updated on December 12, 2020

Comments

  • Tadeusz Kopec for Ukraine
    Tadeusz Kopec for Ukraine over 3 years

    I'd like to use spring support for sending mails. My project is built with maven-2 and I use spring-core 2.5.5 I tried to look in maven central repo for artifact to include in my pom.xml, and the only one I found is spring support. The problem is that the highest version in repo is 2.0.8 and it depends on spring-core v. 2.0.8. Should I add it and exclude from its dependencies spring-core, spring-aop and so on, or should I look for another artifact (but which one will do?) or use another repo? Which is the proper maven-2 artifact for org.springframework.mail and where can I find it?

  • Jason
    Jason over 11 years
    spring framework is ridiculous.....where in link does it ever mention the need for "context-support". Hey Spring....only 1/2 the world has wasted their life in Maven....
  • Abdull
    Abdull almost 11 years
    ... and all org.springframework.mail source assets are hosted in the main SpringSource/spring-framework repository.
  • Eaton Emmerich
    Eaton Emmerich about 2 years
    Any idea how to find this? Is there a reverse lookup table or something I can use?