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
1 answer

Fetching X-Mailer in java imap

How to fetch x-mail in java imap ? I have written a sample program but it not working fine. I am getting null value. Where I am going wrong ? import com.sun.mail.imap.IMAPFolder; import com.sun.mail.imap.IMAPMessage; import…
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186
1
vote
2 answers

Copy Messages from one folder to another in the same email server - java mail

I need to copy the emails from one folder to another and remove the email from the initial folder. For that I wrote this piece of code IMAPFolder newFolder; newFolder = (IMAPFolder)getMessageStore().getFolder(folderName); boolean created =…
tech4
  • 541
  • 2
  • 14
  • 37
1
vote
0 answers

Unable to send an email using javamailsender in spring mvc

I am creating a registration form using spring mvc in which email is one of the fields, once user is filled the details and click on register button , I would like to send an email to the given user email address with a random otp. application…
Uday Kumar
  • 123
  • 10
1
vote
2 answers

Automatic Email with Javamail in Android

I'm trying to send an email automatically, without user confirmation in my Android App. I'm trying to do with Javamail, but when I try my app on my phone, it's close with the typical "APP STOPPED, Open again" Android message. My code is: SEND MAIL…
aidamf
  • 11
  • 1
  • 4
1
vote
1 answer

Unable to read custom header from email

I am adding custom header while sending email in Java. If anybody gives reply to that email I need to store the content of that email in database. I might receive multiple reply for that mail. So for identification I am adding custom header with…
Jayanth
  • 159
  • 9
1
vote
1 answer

Forward MimeMessage object messages as an regular forward format INSTEAD of an attachment in EML file

Basically i'm trying to structure for forward email and then convert it into EML file.But the original message object msg is rendering as attachment instead of normal message in EML file. I've tried setContent and getDataHandler methods to add…
Batman
  • 103
  • 3
  • 12
1
vote
1 answer

Why am I getting a filenotfound exception even though my file is there in the correct location?

The following code of mine used to work before. But after I've recently formatted my mobile, it doesn't work anymore. Please help me with this. The code for setting the path is: path = Environment.getExternalStorageDirectory().getPath() +…
user11374813
1
vote
0 answers

How to send mail from JSP page in Spring (AWS Codestar)?

Using AWS Codestar I am trying to send emails directly from JSP but getting errors in every method does anyone have any idea of how to send mail in spring
Rajiv
  • 11
  • 1
1
vote
0 answers

Why does Geronimo Javamail not fetch the message subject and collides with default JVM implementation?

In our continuous integration we had a test failure because a new email sent during the test would not be downloaded. Digging down to the problem and enabling javamail debug we found out that locally DEBUG: getProvider() returning …
Edmondo
  • 19,559
  • 13
  • 62
  • 115
1
vote
0 answers

Obtain OAuth Credentials for my own GMail account

I was using the older JavaMail API to send email from my Android app using password based authentication. The thing is that I am using my own GMail account for sending email (thus storing email/password in code - I know that is not a good idea) new…
Bonton255
  • 2,231
  • 3
  • 28
  • 44
1
vote
1 answer

p7s file and javamail

I use this code to read an email String in S/Mime format in a certificated email. This is a snippet InputStream inputStreamObj = new ByteArrayInputStream(message.getBytes()); MimeMessage mimeMessageObj = new MimeMessage(session,…
Giant2
  • 461
  • 1
  • 4
  • 15
1
vote
1 answer

Unable to send email using servlet and JavaMail

I am working on sending emails using JavaMail,but getting error as javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials g188sm3298732pfc.24…
user11176692
1
vote
1 answer

MailConnectException: Couldn't connect to host, port -- Limit to number of POP3 requests that can be made?

I was messing around with the JavaMail API and consistently encountered a MailConnectException and SocketTimeoutException shortly after trying to rapidly open many sessions (~50) simultaneously (i.e. tried to log in to many different mail accounts…
mxmschndo
  • 11
  • 2
1
vote
2 answers

Tomcat 6 Javax.mail session envCtx.lookup("mail/Session") not returning

I am using Tomcat 6 to send a email client with Javax.mail APIs , i set up my configurations in server.xml as below And…
user684434
  • 1,165
  • 2
  • 19
  • 39
1
vote
1 answer

Domino 10 sometime does not decode MIME headers under Java

I have a Java 1.8 program running on the Domino 10.0.1 server which reads POP3/IMAP MIME messages and creates a Notes MIME mail document from it. Everything works fine, except that some (very few) messages do not convert the coded MIME headers. They…
Andy Brunner
  • 133
  • 3
  • 12
1 2 3
99
100