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
5,208
questions
-2
votes
3
answers
136
views
Unexpected error when trying to send a email via spring boot
I needed to write a service for sending emails, but no matter how many sources I looked at java mailer documentation, nothing comes out and crashes with an unexpected error:
"Mail server ...
-1
votes
0
answers
17
views
Getting an error "javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. For more information, go to 535 5.7.8 "
javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. For more information, go to
535 5.7.8 https://support.google.com/mail/?p=BadCredentials d2e1a72fcca58-...
0
votes
0
answers
69
views
JAVAX Mail - ERROR: 503 5.7.0 encryption too weak 0 less than 128
I'm stumped and not sure how to proceed. I am maintaining a legacy app and they want to convert the mail servers to TLS V1.2 and change the host. I am getting the following error -
DEBUG SMTP: ...
0
votes
1
answer
242
views
No provider of jakarta.mail.util.StreamProvider was found
I'm getting the error below. Any idea how to fix this?
Spring boot version: 3.3.0. Java version: 17.
Error:
Caused by: java.lang.IllegalStateException: No provider of jakarta.mail.util.StreamProvider ...
0
votes
1
answer
83
views
Error: EmailException (Java): Sending the email to the following server failed
I am using commons-email 1.6.0 to send emails and I have been encountering a weird issue where the emails are only sent successfully when the application is launched from netbeans or using java 18.0.2....
1
vote
1
answer
82
views
MimeMessage-attachment too short if readAllBytes
When reading the attachment of a mail-message (B64 encoded) I face a problem.
MimeMessage mm = ...
if (mm.getContentType ().contains ("multipart") == true)
{
MultiPart mp = (...
3
votes
0
answers
199
views
Problem with connecting to Outlook via IMAP using OAuth2 authentication
We are building a solution where we connect to email mailboxes via IMAP, fetch and store some relevant emails, so that later we can display them in the web UI. Later on we plan to add support for ...
0
votes
0
answers
49
views
spring boot gmail authentication failed
I implemented gmail service in spring boot. i configured spring.mail.password is app password but it still threw an exception
jakarta.mail.AuthenticationFailedException: 535-5.7.8 Username and ...
0
votes
0
answers
68
views
Spring Integration Mail IMAP
I am developing an Inbox listener for [email protected] using IMAP protocol with Spring Integration Mail. I am using XOAUTH2 to Autheticate and SSL.
The email is an outlook email, so as I want to ...
1
vote
1
answer
61
views
Error using simple java mail on a javafx project
I have this code on a test project and it works fine, but idk why when i put it on my package on the javafx project i want to use it for real this line:
.from("example", "example@...
0
votes
2
answers
88
views
java.lang.IllegalArgumentException: From address must not be null
I have a project with Java 17 and Spring 3. In my pom.xml the Test extensions are the following:
junit-jupiter: version 5.10.1.
mockito-core: version 5.8.0.
mockito-junit-jupiter: version 5.8.0
I ...
-1
votes
1
answer
63
views
How to read possibly malicious EML file
I am trying to read an EML file which may contain viruses.
I am using JavaMail API (now JakartaMail) to read an EML file using below code.
If the EML file contains viruses, from (1) to (6), which line ...
0
votes
0
answers
50
views
Send a outlook calendar invite from Java service
I'm trying to send a calendar invite using a Java service. The email is sent appropriately, however, the calendar invite is received as an attachment in the form of a .ics file. However, rather than ...
0
votes
0
answers
20
views
Using Spring Book JavaMailSender with OAuth2
Has anyone had luck with creating a JavaMailSender implementation to automatically handle token refresh/etc ? (specifically with Google OAuth2)
We could construct a JavaMailSenderImpl for every ...
0
votes
0
answers
10
views
javamail connecting to gmail, expunging messages in Sent Mail does not fully delete the message
I am using the jakarta flavor of javamail, connecting to gmail.
After I send a message with gmail using javamail, I then delete matching messages from Sent Mail and then run an expunge operation on ...