diff --git a/logback-access/pom.xml b/logback-access/pom.xml
index 21a07c87a4..32d4b8b1cc 100755
--- a/logback-access/pom.xml
+++ b/logback-access/pom.xml
@@ -61,12 +61,14 @@
hsqldb
test
+
- javax.mail
- javax.mail-api
+ jakarta.mail
+ jakarta.mail-api
compile
true
+
diff --git a/logback-classic/pom.xml b/logback-classic/pom.xml
index 8adf91555b..4462856e22 100755
--- a/logback-classic/pom.xml
+++ b/logback-classic/pom.xml
@@ -96,16 +96,21 @@
mysql-connector-java
test
+
- javax.mail
- javax.mail-api
+ jakarta.mail
+ jakarta.mail-api
+ compile
true
+
- com.sun.mail
- javax.mail
- runtime
-
+ com.sun.mail
+ jakarta.mail
+ runtime
+ true
+
+
org.codehaus.janino
janino
@@ -125,7 +130,7 @@
com.icegreen
greenmail
- 1.5.10
+ 2.0.0-alpha-1
test
diff --git a/logback-classic/src/main/java9/module-info.java b/logback-classic/src/main/java9/module-info.java
index 311300abab..1d9223f471 100644
--- a/logback-classic/src/main/java9/module-info.java
+++ b/logback-classic/src/main/java9/module-info.java
@@ -2,6 +2,7 @@
requires org.slf4j;
requires static java.management;
requires static javax.servlet.api;
+
requires ch.qos.logback.core;
uses ch.qos.logback.classic.spi.Configurator;
provides org.slf4j.spi.SLF4JServiceProvider with ch.qos.logback.classic.spi.LogbackServiceProvider;
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_GreenTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_GreenTest.java
index a415774c66..7ebc6b722c 100755
--- a/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_GreenTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_GreenTest.java
@@ -39,9 +39,9 @@
import org.junit.Test;
import org.slf4j.MDC;
-import javax.mail.MessagingException;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
+import jakarta.mail.MessagingException;
+import jakarta.mail.internet.MimeMessage;
+import jakarta.mail.internet.MimeMultipart;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.xava
similarity index 99%
rename from logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.java
rename to logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.xava
index f86b8fbaf9..74a243bea6 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/net/SMTPAppender_SubethaSMTPTest.xava
@@ -24,9 +24,9 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
-import javax.mail.Part;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
+import jakarta.mail.Part;
+import jakarta.mail.internet.MimeMessage;
+import jakarta.mail.internet.MimeMultipart;
import org.dom4j.io.SAXReader;
import org.junit.After;
diff --git a/logback-core/pom.xml b/logback-core/pom.xml
index 5355ba3862..4cf1787c04 100755
--- a/logback-core/pom.xml
+++ b/logback-core/pom.xml
@@ -33,18 +33,26 @@
jansi
true
+
- javax.mail
- javax.mail-api
+ jakarta.mail
+ jakarta.mail-api
compile
true
- com.sun.mail
- javax.mail
- runtime
- true
-
+ jakarta.activation
+ jakarta.activation-api
+ compile
+ true
+
+
+
+ com.sun.mail
+ jakarta.mail
+ runtime
+ true
+
org.mockito
diff --git a/logback-core/src/main/java/ch/qos/logback/core/net/LoginAuthenticator.java b/logback-core/src/main/java/ch/qos/logback/core/net/LoginAuthenticator.java
index 018545337d..6b0546baff 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/net/LoginAuthenticator.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/net/LoginAuthenticator.java
@@ -13,8 +13,8 @@
*/
package ch.qos.logback.core.net;
-import javax.mail.Authenticator;
-import javax.mail.PasswordAuthentication;
+import jakarta.mail.Authenticator;
+import jakarta.mail.PasswordAuthentication;
/**
* Used by SMTPAppender for authentication purposes.
diff --git a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
index e8380c7b45..da419ef318 100755
--- a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
@@ -20,15 +20,15 @@
import java.util.Properties;
import java.util.concurrent.Future;
-import javax.mail.Message;
-import javax.mail.Multipart;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeBodyPart;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
+import jakarta.mail.Message;
+import jakarta.mail.Multipart;
+import jakarta.mail.Session;
+import jakarta.mail.Transport;
+import jakarta.mail.internet.AddressException;
+import jakarta.mail.internet.InternetAddress;
+import jakarta.mail.internet.MimeBodyPart;
+import jakarta.mail.internet.MimeMessage;
+import jakarta.mail.internet.MimeMultipart;
import javax.naming.Context;
import javax.naming.InitialContext;
diff --git a/logback-core/src/main/java9/module-info.java b/logback-core/src/main/java9/module-info.java
index 456ee33a4c..55c366801f 100644
--- a/logback-core/src/main/java9/module-info.java
+++ b/logback-core/src/main/java9/module-info.java
@@ -2,7 +2,9 @@
requires static transitive java.sql;
requires static transitive java.naming;
requires static transitive java.xml;
- requires static javax.mail.api;
+ requires static jakarta.mail;
+ requires static jakarta.activation;
+
requires static javax.servlet.api;
requires static janino;
requires static commons.compiler;
diff --git a/pom.xml b/pom.xml
index 04c54ed38b..7e3acc2c1d 100755
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,8 @@
UTF-8
4.12
1.3
- 1.6.2
+
+ 2.0.1
3.1.6
+
+
+ jakarta.mail
+ jakarta.mail-api
+ ${jakarta.mail.version}
+
+
+
+ jakarta.activation
+ jakarta.activation-api
+ ${jakarta.mail.version}
+
+
+
+ com.sun.mail
+ jakarta.mail
+ ${jakarta.mail.version}
+
org.dom4j