Sign in

I found good email test service, MailTrap.

MailTrap

When I send email as a test on my application, I’m always very carefully. Sometimes I need to switch recipients from actual data to dummy data.

But MailTrap solves this problem.

MailTrap prepares dummy inbox with SMTP and POP.


Recently I study about JavaMail.

Actually, I was pretty confused when I used JavaMail at first. My question was “Which dependency is correct to use JavaMail?”. There are a few definitions of Maven.

№1

<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>

№2

<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>1.4.7</version>
</dependency>

№3

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.4.7</version>
</dependency>

I found the answer in Stack Overflow. Bill Shannon who is Spec Lead of Java EE answered it. Great!

Finally, I use the last one. The latest version of JavaMail now is 1.6.1.

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.1</version>
</dependency>

Yoichi Kikuta

Developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store