I want to do this tutorial https://www.tutorialspoint.com/java/java_sending_email.htm about sending emails with java and the first line of the tutorial says that I need to download JavaMail (mail.jar)
and JAF (activation.jar)
, and I want to download those jars using maven is that possible since this popular website says that is not possible http://www.mkyong.com/maven/how-to-download-javamail-api-from-maven/ ,
I tried searching in the maven repository but there are too many jars with the same name
You simply need to add this dependency to your maven project:
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.5.6</version>
</dependency>
No need to add activation
too (unless you want to use a specific version) as it is already a dependency of javax.mail
such that it will be added as dependency to your project by transitivity.
You can find all the artifacts' description in the home page of the javamail
project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With