Questions tagged [jakarta-mail]

A Java API to send and receive emails. Jakarta Mail (previously JavaMail) is part of Jakarta EE (previously Java EE), but can also be used in Java SE via a separate download.

Jakarta Mail (previously JavaMail) is a Java API used to send and receive email via SMTP, POP3 and IMAP. Jakarta Mail is built into the Jakarta EE platform, but also provides an optional package for use in Java SE.

The current version and last release in the 1.x line is 1.6.5, released on March 10, 2020. Another open source JavaMail implementation exists - GNU JavaMail - while supporting only version 1.3 of the JavaMail specification, it provides the only free NNTP backend, which makes it possible to use this technology to read and send news group articles.

In 2018 JavaMail became part of the EE4J initiative under the Eclipse Foundation, and was renamed to Jakarta Mail.

Useful links

Related Tags:

5196 questions
1
vote
2 answers

error: package sun.net.smtp is not visible

We are moving some old code to java11.We are creating a smtp client. The coe compilation fails when we use java11. error: package sun.net.smtp is not visible [javac] sun.net.smtp.SmtpClient SMTP = new sun.net.smtp.SmtpClient(SMTP_SERVER); [javac] …
Ammy
  • 31
  • 5
1
vote
0 answers

Perform S/MIME signing and checking signature immediately afterwards fails

The following source is a JUnit-Test that shows the problem in question. import java.math.BigInteger; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.PublicKey; import…
Lothar
  • 5,323
  • 1
  • 11
  • 27
1
vote
1 answer

Junit test for email service

I want to test a simple method that sends email using smtp.gmail.com. The person who is sending email and the password is set at the application.properties and is being used using @Value annotation. How could I write the Junit test for such a…
Abhishek Dutta
  • 75
  • 4
  • 12
1
vote
2 answers

AWS SNS Response Link to JavaMail

I have sent my mail through java mail and registered my email on Amazon to get the response notifications (Bounce, Delivered) etc. How can i succesfully match these two to say when i have sent the mail, the mail i sent has the following incomming…
Tinus Jackson
  • 3,397
  • 2
  • 25
  • 58
1
vote
0 answers

Microsoft outlook doesn't shows German umlauts

I have an email send through SMTP which contains some German characters (umlauts). The encoding used is 'UTF-8', but the content is not displaying correctly. But when I choose the 'view source' in outlook app (by right click), the result shows all…
Edayan
  • 537
  • 1
  • 7
  • 17
1
vote
1 answer

SMTP Sending multiple emails

I have to send reminder emails to about 150 people 1st of every month. It seemed to be working fine, but this month... I started to get Caused by: javax.mail.AuthenticationFailedException: 421 4.3.2 Service not active…
Cho
  • 11
  • 5
1
vote
2 answers

MimeMultipart message dump with boundaries

I'm trying to log MimeMultipart message with the code which looks like MimeMultipart mimeMultipart = null; try { mimeMultipart = (MimeMultipart) msg.getContent(); } catch (IOException e) { e.printStackTrace(); } catch (MessagingException e)…
JackTheKnife
  • 3,795
  • 8
  • 57
  • 117
1
vote
1 answer

Repeated warning trace from javax.mail after updating

I recently went forward and updated our codebase's JavaMail API to the latest one. All in all the process was very smooth and I did not encounter any problem. Thing is though that now my app keeps displaying the following warning message: Jun 04,…
akortex
  • 5,067
  • 2
  • 25
  • 57
1
vote
0 answers

JavaMail Error. Transport.send(message) throws java.lang.NoClassDefFoundError: sun/security/ssl/EllipticCurvesExtension

I am trying to send an email using Gmail SMTP via TLS. The code below seems correct but i get an error at Transport.send(message). I have tried all the solutions i could found over the internet including this to no avail. Here is my…
Captain A
  • 191
  • 1
  • 2
  • 11
1
vote
4 answers

Problem sending mail with javamail

I'm trying to send an email to myself using the javamail api. I've followed the code correctly that I found online but I can't seem to get it to work. The error I'm getting is: Exception in thread "main" javax.mail.AuthenticationFailedException:…
JPC
  • 8,096
  • 22
  • 77
  • 110
1
vote
1 answer

Needs to mock beans in integration test case

I am writing an integration test case by using testng for spring batch job. In my application, I am using Google API for address and Mail Sender to send the email. In my integration test case, it takes time during a test run for connection and at…
Vimit Dhawan
  • 597
  • 1
  • 7
  • 25
1
vote
1 answer

how to import javax.mail in eclipse?

I am learning how to use JavaMail. (i have se11) I downloaded javax.mail.jar, put it under C:\Java\jdk , and extract it. I followed the instruction, set CLASSPATH = C:\Java\jdk\javax.mail.jar ; and I add the javax.mail.jar to the eclispe…
BEI
  • 11
  • 1
  • 2
1
vote
2 answers

Keep receiving javax.mail.Session$1: method ()V not found when trying to send an email using Springboot + mvc

This is the code tht generates the error: import com.cisco.s3.util.Logging; import javax.mail.internet.MimeMessage; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import…
1
vote
1 answer

my code results an error with STARTTLS how can i solve it?

I wrote the whole code and imported mail, activation, com.sun.mail, and smtp jars, but it still giving me an error in starttls this is the error : javax.mail.MessagingException: STARTTLS is required but host does not support STARTTLS, …
1
vote
2 answers

Cannot delete emails of domain .co.jp type

I have written java code using java mail API. Which does the following things for IMAPs account: Mark mail as read/Unread. Send/Delete mails. My code works well for most of IMAP mail accounts. I am fetching the mails based on their UID. But…
Jennis Vaishnav
  • 331
  • 7
  • 29
1 2 3
99
100